F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

A math problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 362    Accepted Submission(s): 170


Problem 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).
 

Author
dandelion
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 02:03:14, Gzip enabled