In a cryptarithm, numbers are represented by replacing their digits by letters; a given letter consistently represents the same digit and different letters represent different digits. Solve the following cryptarithm:
ONE and NINE are odd perfect squares and
FOUR is an even perfect square.
Source: Richard England (New Scientist)