Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-avtomorf-sonlar

Is it automorphic

Easy 1000 ms 128 MB 31%
Share

Write a function IsAutomorphic(x) that returns true if the positive integer $x$ is automorphic and false otherwise. A number is automorphic if its square ends with the number itself.

Example 1: IsAutomorphic(76) → true — $76^{2} = 5776$.

Example 2: IsAutomorphic(7) → false — $7^{2} = 49$.

Write only the function body.

The number 76 goes into the function IsAutomorphic, which returns true

Input

One line with a positive integer $x$ — the argument of the function.

Output

The value returned by the function: true or false.

Note

$1 \le x \le 10^{6}$

Examples

Input #1
76
Output #1
true
Input #2
7
Output #2
false

Sign in to submit a solution

Signing up is free and takes a minute.