A math problem

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 2650
64-bit integer IO format: %I64d      Java class name: Main

Description

Dandelion's poor at math , recently her friend asks her a math problem. Now she wants you to help her. The problem is : give you a number a+b*j ,
j=√ -2,If this number can only be divided by 1 and itself or -1 and the negative of itself . Please print Yes ,else print No.

Input

Each line contains two integer a and b (0<=a<=100000 , 0<b<=100000 ).

Output

Yes or No for each case.

Sample Input

5 1
3 4

Sample Output

No
Yes

Hint 5+j can be divided into (1-j)*(1+2j).

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .