Three pieces of strings have a length of 124 cm, 286 cm and 320 cm respectively. Each string is cut into several pieces of the same length and no string is left over. What is the length of the longest piece of string?​