Given a table with numbers $1, 2, \ldots, 18$, determine the minimal number of numbers that must be erased so that the sum of any two remaining numbers is not a perfect square of a positive integer.

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