A 21-foot beam is to be cut into three pieces so that the second and third piece are each 3 times the length of the first piece. If X represents represents the length of the first piece find the length of each piece.