Pairwise coprime: 8, 9, 25
gcd(8, 9) = 1
gcd(8, 25) = 1
gcd(9, 25) = 1
Every pair passes, so the list is pairwise coprime. Its collective GCD is also 1.
Negative signs are allowed and do not change coprimality. Use underscores—not commas or spaces—inside a grouped integer, for example 1_000_003.
The starting example 8, 9, 25 is pairwise coprime because all three pair GCDs equal 1.
Two integers a and b are coprime, also called relatively prime, exactly when their greatest common divisor is 1:
gcd(|a|, |b|) = 1
A list a1, …, an is pairwise coprime when gcd(|ai|, |aj|) = 1 for every pair of different positions i and j.
The integers do not need to be prime. For instance, 8 and 9 are both composite and are coprime because they share no positive divisor other than 1.
gcd(8, 9) = 1
gcd(8, 25) = 1
gcd(9, 25) = 1
Every pair passes, so the list is pairwise coprime. Its collective GCD is also 1.
gcd(6, 10) = 2
gcd(6, 15) = 3
gcd(10, 15) = 5
The GCD of all three numbers is 1, but no pair has GCD 1. Collective coprimality does not imply pairwise coprimality.
Exactness and limits: JavaScript BigInt arithmetic avoids floating-point rounding. The 50-integer and 500-digit limits cap the maximum work at 1,225 pair checks and keep unusually large inputs responsive.
They are coprime when their greatest common divisor is 1. Equivalently, they share no positive factor other than 1.
Every pair formed from different positions in the list must be coprime. Testing only the GCD of the whole list is not enough.
Collectively coprime means the whole-list GCD is 1. Pairwise coprime requires every two-number GCD to be 1, so it is the stronger condition. The list 6, 10, 15 demonstrates the difference.
No. Numbers may be composite and still be coprime. For example, gcd(8, 9) = 1 even though 8 and 9 are composite.
The GCD uses absolute values, so signs do not matter. Since gcd(0, n) = |n|, zero is coprime only with 1 or −1. Two zeros have GCD 0 and are not coprime.
Yes, because positions are tested exactly as entered. Repeated 1 or −1 values remain pairwise coprime, while two repeated values with absolute value greater than 1 have that value as their GCD and fail.
Yes. Validation and exact GCD calculations happen entirely in your browser. The tool does not upload, store, or add the list to the page URL.