D - Divisor Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 7

問題文

正の整数 X, Y が与えられます。 X の正の約数の個数と Y の正の約数の個数を比較し、

  • X の正の約数の個数の方が多いなら X と出力し、
  • Y の正の約数の個数の方が多いなら Y と出力し、
  • 両者が等しいなら Z と出力してください。

制約

  • 1 \leq X, Y \leq 10^6
  • X, Y は整数

入力

入力は以下の形式で標準入力から与えられる。

X Y

出力

答えを出力せよ。


入力例 1

4 6

出力例 1

Y

4 の正の約数は 1, 2, 43 つであり、6 の正の約数は 1, 2, 3, 64 つです。 6 の正の約数の方が 4 の正の約数より多いので、Y を出力します。


入力例 2

6 4

出力例 2

X

入力例 3

3 5

出力例 3

Z

Score : 7 points

Warning

Do not make any mention of this problem until October 2, 2021, 6:00 p.m. JST. In case of violation, compensation may be demanded. After the examination, you can reveal your total score and grade to others, but nothing more (for example, which problems you solved).

Problem Statement

You are given positive integers X and Y. Compare the number of positive divisors of X and that of Y.

  • If X has more positive divisors than Y does, print X.
  • If Y has more positive divisors than X does, print Y.
  • If X and Y have the same number of divisors, print Z.

Constraints

  • 1 \leq X, Y \leq 10^6
  • X and Y are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

Print the answer.


Sample Input 1

4 6

Sample Output 1

Y

4 has three positive divisors: 1, 2, and 4, while 6 has four positive divisors: 1, 2, 3, and 6. Since 6 has more positive divisors than 4 does, you should print Y.


Sample Input 2

6 4

Sample Output 2

X

Sample Input 3

3 5

Sample Output 3

Z