When asked about his age, mathematician Augustus De Morgan1 used to offer a clue:
I was $$x$$ years of age in the year $$x^2$$.
After all, he turned 43 in the year 1849. That quirk puts De Morgan in a pretty exclusive club called the Confederacy of Squares, whose members reach age $$x$$ in the year $$x^2$$ (with $$x \in \mathbb{N}_0$$). Other known members include Charles Atlas2 (who was 44 in 1936) and Jake Gyllenhaal3 (who will be 45 in 2025). Next up: babies born in 2070 will be 46 in 2116.
The name of a person and his or her year of birth, each on a separate line.
If the person can ever reach the age $$x$$ in the year $$x^2$$, write a sentence that mentions the name of the person who belongs to the Confederacy of Squares, together with the age and the year at which the condition is or will be met. Use the format as indicated in the examples below. If the person does not belong to the Confederacy of Squares, write a sentence that indicates this fact using the format indicated in the last example below.
To determine whether a person belongs to the Confederacy of Squares, we do not take into account the fact that the person might die (or has died) before reaching the age at which the condition is met.
The format of the sentence that indicates that a person belongs to the Confederacy of Squares differs slightly if the year is in the past or in the future. For this, compare the output of the first two examples that are given below. The following interactive session shows how you can determine the current year in Python.
>>> from datetime import date
>>> date.today().year
2019
Input:
Augustus De Morgan
1806
Output:
Augustus De Morgan was 43 in 1849.
Input:
Jake Gyllenhaal
1980
Output:
Jake Gyllenhaal turns 45 in 2025.
Input:
Thomas Alva Edison
1847
Output:
Thomas Alva Edison is not a member of the Confederacy of Squares.