-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMake Factor
More file actions
35 lines (32 loc) · 772 Bytes
/
Make Factor
File metadata and controls
35 lines (32 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
if(b%a==0)
{
System.out.println("Yes");
}
else if(b%a!=0)
{
for(int x=1;x<100;x++)
{
int c=x+a;
int d=x+b;
if(d%c==0)
{
System.out.println("Yes");
break;
}
else{
System.out.println("No");
break;
}
}
}
}
}