The following information shows the duration of a year on some unknown planets of equal mass.
Planet Y: 224 days
Planet X: 320 days
Which of the following best explains which planet is closer to the sun?
A. Planet Y, because gravity is directly proportional to square of distance
B. Planet Z, because gravity is directly proportional to the square of distance
C. Planet Z, because the sun exerts a greater gravitational force on it than on planet Y
D. Planet Y, because the sun exerts a greater gravitational force on it than on planet Z