Fedja used matches to form a parallelogram, ensuring that the sides are of equal length and the vertices do not lie on a single line. It is observed that exactly 7 or 9 matches fit into the diagonals. Determine the number of matches that make up the perimeter of the parallelogram.

Let's think step by step and output the final answer within \boxed{}.
user