Two numbers are relatively prime if they have no common factors except 1.

Examples

14 = 2*7

15 = 3*5

These two numbers are relatively prime: They have no factors in common.

6 = 2*3

15 = 3*5

These two numbers have 3 as a common factor. They are not relatively prime.

Examples

14 = 2*7

15 = 3*5

These two numbers are relatively prime: They have no factors in common.

6 = 2*3

15 = 3*5

These two numbers have 3 as a common factor. They are not relatively prime.