Problems
10045 - Co-Prime
SUBMIT PROBLEM

Co-Prime

Time Limit: 1 sec

 

The Problem

Given two numbers, you have to find if they are co-prime or not.

 

Two numbers are said to be co-prime if the only positive integer that divides both of them is 1. That is, the only common positive factor of the two numbers is 1.

 

The Input

In the first line there will be a positive integer T (0<T<500) that is the test case. In the next T lines there will be 2 positive integer N1, N2 (1<=N1, N2<1000000).

 

The Output

For each test case you have to print print “Case X: Yes” if the given numbers are co-prime, otherwise print “Case X: No”. Here x is case number. 

 

Sample Input

2

10 5

10 3

 

Sample Output

Case 1: No

Case 2: Yes 

 

 

 

 

Online Practice Contest 1 [School & College Level]

Problem Setter: Fahim Abrar