A seamstress has three colors of ribbon: red is 126 cm, blue is 196 cm, and green is 378 cm long. She wants to cut them so they are all the same length, with no ribbon wasted. What is the greatest length, in cm, that she can make the ribbons?