Joyful Numbers

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

We say that an integer n1n \geq 1 is joyful if, by concatenating the digits 2525 to the right of nn, we get a perfect square. For example, 22 is a joyful number (as 225=152225 = 15^2) but 33 is not (as 325325 is not a perfect square).

Given an integer kk such that 1k1091 \leq k \leq 10^9, count the number of distinct prime factors of the kk-th joyful number.

입력

The first line contains one integer tt, the number of test cases (1t41031 \leq t \leq 4 \cdot 10^3).

Each test case is given on a separate line containing an integer kk (1k1091 \leq k \leq 10^9).

출력

For each test case, print a line with a single integer: the number of distinct prime factors of the kk-th joyful number.

힌트

The first joyful number is 22, which has one distinct prime factor. The fourth joyful number is 20=22520 = 2 \cdot 2 \cdot 5, which has two distinct prime factors.