HCF, LCM and divisibility rules โ the foundations
Number theory might look like pure abstraction, but HCF and LCM are the silent engines behind timetable synchronisation, tile-laying puzzles, cutting material without waste, and nearly every quantitative-aptitude section in SSC CGL, RRB NTPC, and IBPS exams.
Foundational Concepts
Definition: A factor (or divisor) of a number n is any integer that divides n exactly (with no remainder). Every number has 1 and itself as factors.
Definition: A multiple of n is any integer that is exactly divisible by n: multiples of 6 are 6, 12, 18, 24, ...
Definition: A prime number is a natural number greater than 1 with exactly two factors: 1 and itself. Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 ...
Definition: HCF (Highest Common Factor) โ also called GCD (Greatest Common Divisor) โ is the largest number that divides each of the given numbers exactly.
Definition: LCM (Least Common Multiple) is the smallest positive number that is divisible by each of the given numbers.
Divisibility Rules โ The Speed Engine
Knowing these rules lets you instantly check whether large numbers are divisible without actual division.
| Divisor | Rule | Example |
|---|---|---|
| 2 | Last digit is even (0,2,4,6,8) | 4,726 โ last digit 6 โ |
| 3 | Sum of all digits divisible by 3 | 5,271: 5+2+7+1=15 โ |
| 4 | Last 2 digits divisible by 4 | 2,348: 48รท4=12 โ |
| 5 | Last digit is 0 or 5 | 3,445 โ |
| 6 | Divisible by BOTH 2 and 3 | 2,412: even โ, digit sum 9 โ |
| 7 | Double last digit, subtract from rest; if result is 0 or divisible by 7 | 343: double 3=6; 34โ6=28; 28รท7=4 โ |
| 8 | Last 3 digits divisible by 8 | 4,096: 096รท8=12 โ |
| 9 | Sum of all digits divisible by 9 | 7,281: 7+2+8+1=18 โ |
| 10 | Last digit is 0 | 5,730 โ |
| 11 | Alternating sum (odd positions โ even positions) divisible by 11 | 3,729: (3+2)โ(7+9)=5โ16=โ11 โ |
| 12 | Divisible by both 3 and 4 | 2,604: digit sum 12 โ, last two 04 โ |
| 25 | Last 2 digits are 00, 25, 50, or 75 | 4,375: last two 75 โ |
Rule of 7 โ worked step-by-step: Is 161 divisible by 7?
- Last digit = 1; double it = 2.
- Remaining number = 16.
- 16 โ 2 = 14.
- 14 รท 7 = 2. Yes, divisible.
Rule of 11 โ worked step-by-step: Is 91,861 divisible by 11?
- Odd positions (from left): 9, 8, 1 โ sum = 18.
- Even positions: 1, 6 โ sum = 7.
- Alternating difference: 18 โ 7 = 11. Divisible by 11. โ
Why these rules matter: In multi-part problems, checking divisibility saves you from calculating long divisions. Especially useful for factor/LCM problems and "how many numbers between X and Y are divisible by Z" questions.
Finding HCF โ Two Methods
Method 1: Prime Factorisation
Write each number as a product of prime factors in exponential form. HCF = product of minimum powers of all common primes.
Question: Find HCF(72, 120, 180).
Solution:
Step 1: 72 = 2ยณ ร 3ยฒ; 120 = 2ยณ ร 3 ร 5; 180 = 2ยฒ ร 3ยฒ ร 5.
Step 2: Common primes: 2 and 3.
Step 3: Min power of 2 = 2ยฒ; min power of 3 = 3ยน.
Conclusion: HCF = 2ยฒ ร 3 = 4 ร 3 = 12.
Method 2: Euclidean Algorithm (fastest for large numbers)
Based on the property: HCF(a, b) = HCF(b, a mod b). Repeat until remainder = 0.
Question: Find HCF(252, 105).
Solution:
Step 1: 252 = 2 ร 105 + 42 โ HCF(252, 105) = HCF(105, 42).
Step 2: 105 = 2 ร 42 + 21 โ HCF(105, 42) = HCF(42, 21).
Step 3: 42 = 2 ร 21 + 0 โ HCF(42, 21) = 21.
Conclusion: HCF(252, 105) = 21.
Finding LCM โ Two Methods
Method 1: Prime Factorisation
LCM = product of maximum powers of all primes appearing in any of the numbers.
Question: Find LCM(72, 120, 180).
Solution:
Step 1: 72 = 2ยณ ร 3ยฒ; 120 = 2ยณ ร 3 ร 5; 180 = 2ยฒ ร 3ยฒ ร 5.
Step 2: Max power of 2 = 2ยณ; max power of 3 = 3ยฒ; max power of 5 = 5ยน.
Conclusion: LCM = 8 ร 9 ร 5 = 360.
Method 2: Using HCF
For two numbers only: LCM(a, b) = (a ร b) / HCF(a, b).
Example: LCM(48, 18) = (48 ร 18) / HCF(48, 18) = 864 / 6 = 144.
Important warning: The formula LCM ร HCF = a ร b applies ONLY for two numbers. For three or more numbers, this shortcut does NOT hold.
The Golden Relationship
HCF(a, b) ร LCM(a, b) = a ร b (for two numbers)
This identity is used to find one of HCF/LCM when the other and the product are known.
HCF and LCM of Fractions
| Formula | |
|---|---|
| HCF of fractions | HCF(numerators) / LCM(denominators) |
| LCM of fractions | LCM(numerators) / HCF(denominators) |
Example: HCF(3/4, 9/16, 6/8):
- HCF(3, 9, 6) = 3; LCM(4, 16, 8) = 16.
- HCF of fractions = 3/16.
Key Exam Problem Types
Type 1: Remainder Problems โ Same Remainder
"Find the greatest number that divides 250, 435, and 630 leaving the same remainder."
Method: HCF of differences: |435 โ 250| = 185; |630 โ 435| = 195; |630 โ 250| = 380.
HCF(185, 195, 380).
185 = 5 ร 37; 195 = 5 ร 39 = 5 ร 3 ร 13; 380 = 4 ร 5 ร 19.
HCF = 5.
Answer: 5.
Type 2: Smallest Number with Given Remainder โ Same Divisors
"Find the smallest number that when divided by 6, 8, and 15 leaves a remainder of 2."
Method: LCM(6, 8, 15) + 2.
LCM(6, 8, 15): 6=2ร3; 8=2ยณ; 15=3ร5. LCM = 2ยณ ร 3 ร 5 = 120.
Answer: 120 + 2 = 122.
Type 3: Trailing Zeros in n!
The number of trailing zeros in n! equals the number of times 10 is a factor of n! = min(power of 2, power of 5). Since powers of 2 always exceed powers of 5:
Trailing zeros in n! = โn/5โ + โn/25โ + โn/125โ + ...
Question: How many trailing zeros in 100!?
Solution: โ100/5โ + โ100/25โ + โ100/125โ = 20 + 4 + 0 = 24.
Question: How many trailing zeros in 50!?
Solution: โ50/5โ + โ50/25โ = 10 + 2 = 12.
Type 4: Number of Factors
If n = pโ^a ร pโ^b ร pโ^c ร ..., then:
- Number of factors = (a+1)(b+1)(c+1)...
- Sum of factors = [(pโ^(a+1) โ 1)/(pโ โ 1)] ร [(pโ^(b+1) โ 1)/(pโ โ 1)] ร ...
Question: Find the number of factors of 360.
Solution:
360 = 2ยณ ร 3ยฒ ร 5ยน.
Number of factors = (3+1)(2+1)(1+1) = 4 ร 3 ร 2 = 24.
Question: Find the sum of factors of 72.
Solution:
72 = 2ยณ ร 3ยฒ.
Sum = [(2โดโ1)/(2โ1)] ร [(3ยณโ1)/(3โ1)] = [15/1] ร [26/2] = 15 ร 13 = 195.
Type 5: Bells / Lights / Signals Blinking Together
"Three bells ring at intervals of 6, 8, and 12 minutes. If they ring together at 7:00 AM, when will they next ring together?"
Method: LCM(6, 8, 12) = 24 minutes.
Answer: Next ring together at 7:24 AM.
Real-world example: Traffic light synchronisation in cities uses LCM logic โ signal timings are chosen so that multiple lights re-synchronise at a predictable time, minimising bunching.
Type 6: Largest Tile / Plank / Ruler
"Find the largest square tile that can exactly tile a floor of 216 cm ร 180 cm."
Method: HCF(216, 180) = ?
216 = 2ยณ ร 3ยณ; 180 = 2ยฒ ร 3ยฒ ร 5.
HCF = 2ยฒ ร 3ยฒ = 4 ร 9 = 36 cm.
The tile is 36 cm ร 36 cm.
Properties and Useful Identities
- HCF(a, b) always divides LCM(a, b).
- HCF(a, b) divides every linear combination ma + nb (Bezout's identity).
- If HCF(a, b) = 1, a and b are coprime (no common factor other than 1). LCM = a ร b.
- HCF(a, a+1) = 1 always (consecutive integers are always coprime).
- HCF(aยฒ, bยฒ) = [HCF(a, b)]ยฒ; LCM(aยฒ, bยฒ) = [LCM(a, b)]ยฒ.
Common Misconceptions
Common misconception: "HCF is always smaller than both numbers." True โ HCF โค min(a, b). But students sometimes compute LCM and report it as HCF.
Common misconception: "LCM ร HCF = product holds for any number of terms." FALSE โ it holds only for exactly two numbers. For 3 numbers a, b, c: LCM ร HCF โ a ร b ร c in general.
Common misconception: "Every common factor of two numbers is their HCF." Only the LARGEST common factor is the HCF.
- โ- Divisibility rules for 2โ12 and 25 enable rapid mental arithmetic without full division.
- โ- HCF (prime factorisation): take minimum powers of common primes; Euclidean algorithm is faster for large numbers.
- โ- LCM (prime factorisation): take maximum powers of all primes in any of the numbers.
- โ- LCM ร HCF = a ร b โ valid for exactly TWO numbers only.
- โ- "Smallest number leaving remainder r when divided by a, b, c" = LCM(a,b,c) + r.
- โ- "Largest number dividing a, b, c with same remainder" = HCF of pairwise differences.
- โ- Trailing zeros in n! = โn/5โ + โn/25โ + โn/125โ + ...
- โ- Number of factors of n = p^a ร q^b ร ... is (a+1)(b+1)...
"HCF = Minimum, LCM = Maximum" โ in prime factorisation, HCF picks the minimum power of each prime, LCM picks the maximum. The product HCF ร LCM = a ร b works only for two numbers โ think of a see-saw balanced between two weights.
- โ- HCF is the largest number that divides all given numbers; LCM is the smallest number divisible by all given numbers.
- โ- Prime factorisation method: HCF uses minimum powers of common primes; LCM uses maximum powers of all primes.
- โ- Euclidean algorithm: HCF(a, b) = HCF(b, a mod b) โ fastest method for large numbers.
- โ- Bells/tiles/synchronisation problems โ LCM; cutting without waste/common ruler problems โ HCF.
- โ- Trailing zeros in n! counts factors of 5 using Legendre's formula.
- โ- LCM ร HCF = a ร b is valid only for two numbers โ a common exam trap extends this incorrectly to three.
Number system โ natural, rational, real, divisibility, LCM/HCF
Every number you will ever meet in mathematics belongs to a nested family of sets, and knowing exactly which family it belongs to tells you what operations are safe to perform and how to solve the problems built around it.
Definition: The number system is the organised hierarchy of sets โ Natural, Whole, Integer, Rational, Irrational, Real, Complex โ where each larger set contains all the smaller ones plus new elements.
The hierarchy of number sets
| Set | Symbol | Members | Example |
|---|---|---|---|
| Natural numbers | N | 1, 2, 3, โฆ | Counting things |
| Whole numbers | W | 0, 1, 2, 3, โฆ | N + zero |
| Integers | Z | โฆ, โ2, โ1, 0, 1, 2, โฆ | W + negatives |
| Rational numbers | Q | p/q, q โ 0 | 3/4, โ5, 0.25, 0.333โฆ |
| Irrational numbers | โ | cannot be written as p/q | โ2, ฯ, e |
| Real numbers | R | rational โช irrational | all points on the number line |
| Complex numbers | C | a + ib, i = โ(โ1) | 3 + 4i |
A rational number's decimal expansion either terminates (1/4 = 0.25) or repeats (1/3 = 0.333โฆ). An irrational number does neither โ its decimal goes on forever without any repeating block.
Special subsets worth memorising
- Prime numbers: exactly two distinct divisors (1 and itself): 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47.
- Composite numbers: more than two divisors (4, 6, 8, 9, โฆ).
- 1: neither prime nor composite.
- 2: the only even prime.
- Co-prime (relatively prime): two numbers whose HCF = 1. Example: 7 and 12 share no factor other than 1.
Properties of operations
Closure โ an operation is closed on a set if the result is always in the same set:
- N is closed under + and ร but not under โ (3 โ 5 = โ2 โ N) or รท (3 รท 7 โ N).
- Z is closed under +, โ, ร but not รท (7 รท 3 โ Z).
- Q is closed under +, โ, ร, and รท (excluding division by 0).
Commutativity: a + b = b + a and a ร b = b ร a. Subtraction and division are not commutative.
Associativity: (a + b) + c = a + (b + c). True for + and ร; not for โ or รท.
Distributivity: a ร (b + c) = ab + ac.
Identities: 0 is the additive identity; 1 is the multiplicative identity.
Inverses: โa is the additive inverse of a; 1/a is the multiplicative inverse (a โ 0).
Divisibility rules
| Divisor | Rule | Example |
|---|---|---|
| 2 | Last digit even | 346 โ |
| 3 | Digit sum divisible by 3 | 123 โ 1+2+3=6 โ |
| 4 | Last two digits divisible by 4 | 312 โ 12รท4=3 โ |
| 5 | Last digit 0 or 5 | 235 โ |
| 6 | Divisible by both 2 and 3 | 126 โ |
| 7 | Double the last digit, subtract from rest; repeat | 133 โ 13โ6=7 โ |
| 8 | Last three digits divisible by 8 | 1,024 โ 024รท8=3 โ |
| 9 | Digit sum divisible by 9 | 729 โ 7+2+9=18 โ |
| 10 | Last digit is 0 | 340 โ |
| 11 | Alternating digit sum divisible by 11 | 1,001 โ 1โ0+0โ1=0 โ |
LCM and HCF
LCM (Least Common Multiple): the smallest positive integer divisible by both numbers. Used in problems involving cycles, scheduling, or finding when two periodic events coincide.
HCF / GCD (Highest Common Factor): the largest integer that divides both numbers without a remainder. Used in problems involving splitting into equal groups or simplifying fractions.
Golden property: LCM(a, b) ร HCF(a, b) = a ร b
Method 1 โ Prime factorisation (preferred for exam)
Example: HCF and LCM of 18 and 24.
- 18 = 2ยน ร 3ยฒ
- 24 = 2ยณ ร 3ยน
- HCF: take minimum power of each prime โ 2ยน ร 3ยน = 6
- LCM: take maximum power of each prime โ 2ยณ ร 3ยฒ = 72
- Check: 6 ร 72 = 432 = 18 ร 24 โ
Method 2 โ Euclidean algorithm (fast for two large numbers)
gcd(a, b) = gcd(b, a mod b), repeating until the remainder is 0.
Example: gcd(48, 18) โ gcd(18, 12) โ gcd(12, 6) โ gcd(6, 0) = 6.
Remainder and modular arithmetic
For cyclic remainder problems, find the cycle length and use modular arithmetic.
Example: Find 2^10 mod 7.
Powers of 2 mod 7: 2, 4, 1, 2, 4, 1, โฆ (cycle of length 3).
10 mod 3 = 1. So 2^10 mod 7 = 2ยน mod 7 = 2.
Fermat's little theorem: If p is prime and gcd(a, p) = 1, then a^(pโ1) โก 1 (mod p). Useful for large exponents with prime moduli.
Wilson's theorem: (pโ1)! โก โ1 (mod p) for any prime p.
Unit-digit (last digit) patterns
The last digit of powers cycles with short periods:
| Base | Cycle | Cycle length |
|---|---|---|
| 0, 1, 5, 6 | always same digit | 1 |
| 4, 9 | 4,6,4,6 / 9,1,9,1 | 2 |
| 2 | 2,4,8,6 | 4 |
| 3 | 3,9,7,1 | 4 |
| 7 | 7,9,3,1 | 4 |
| 8 | 8,4,2,6 | 4 |
Question: Unit digit of 7^100?
Cycle for 7: 7, 9, 3, 1 (length 4). 100 mod 4 = 0 โ treat as the 4th position = 1.
Question: Unit digit of 3^25?
Cycle for 3: 3, 9, 7, 1 (length 4). 25 mod 4 = 1 โ 1st position = 3.
Factorials and trailing zeros
n! = n ร (nโ1) ร โฆ ร 2 ร 1. By definition, 0! = 1.
Trailing zeros in n!: each trailing zero requires one factor of 10 = 2 ร 5. Since factors of 2 are far more abundant than factors of 5, count only the factors of 5 using Legendre's formula:
Number of trailing zeros in n! = โn/5โ + โn/25โ + โn/125โ + โฆ
Question: Trailing zeros in 100!?
= โ100/5โ + โ100/25โ + โ100/125โ = 20 + 4 + 0 = 24.
Surds and indices
Definition: A surd is an irrational number expressed using a radical, such as โ2 or ยณโ5, that cannot be simplified to a rational number.
Index laws:
| Law | Statement |
|---|---|
| Product | a^m ร a^n = a^(m+n) |
| Quotient | a^m รท a^n = a^(mโn) |
| Power of a power | (a^m)^n = a^(mn) |
| Zero exponent | a^0 = 1 (a โ 0) |
| Negative exponent | a^(โn) = 1/a^n |
| Fractional exponent | a^(1/n) = โฟโa |
Surd operations:
- โa ร โb = โ(ab)
- โa / โb = โ(a/b)
- (โa)ยฒ = a
- Rationalising the denominator: multiply numerator and denominator by the conjugate. E.g., 1/(โ3+1) ร (โ3โ1)/(โ3โ1) = (โ3โ1)/2.
Worked examples
Q1 โ LCM/HCF: LCM and HCF of 18 and 24?
- Answer: HCF = 6, LCM = 72 (see prime factorisation above).
Q2 โ Trailing zeros: How many zeros at the end of 100!?
- Answer: 24.
Q3 โ Unit digit: Unit digit of 3^25?
- Answer: 3 (cycle position 1, since 25 mod 4 = 1).
Q4 โ AP from divisibility: Sum of all 2-digit numbers divisible by 7?
- List: 14, 21, 28, โฆ, 98 (AP with a = 14, d = 7, last term = 98).
- n = (98 โ 14)/7 + 1 = 13.
- Sum = 13/2 ร (14 + 98) = 13 ร 56 = 728.
Why it matters: The number system is the bedrock topic for SSC CGL, RRB NTPC, IBPS, CSAT and all school mathematics. Divisibility rules, LCM/HCF, unit digits and trailing zeros appear in nearly every shift of competitive exams. Mastering these is non-negotiable for a high score in quantitative aptitude.
Real-world example: The LCM concept appears directly in everyday scheduling โ if Bus A departs every 12 minutes and Bus B every 18 minutes, they leave together every LCM(12, 18) = 36 minutes. That is a standard exam template repeated in dozens of variations.
Common misconception: Students frequently confuse HCF and LCM applications. HCF is used to split (find the largest equal group), LCM is used to combine (find when events coincide). Also, 1 is neither prime nor composite โ this trips a remarkable number of students in exam conditions.
- โ- Number sets nest: N โ W โ Z โ Q โ R โ C; each set inherits the previous one's properties.
- โ- Rational decimals terminate or repeat; irrational decimals never repeat.
- โ- 1 is neither prime nor composite; 2 is the only even prime.
- โ- HCF uses minimum prime-factor powers; LCM uses maximum powers.
- โ- LCM ร HCF = product of the two numbers.
- โ- Trailing zeros in n! = count of 5-factors via Legendre's formula.
- โ- Unit digits of powers follow cycles of length 1, 2, or 4 โ find the cycle, then mod the exponent.
- โ- Rationalise surds by multiplying by the conjugate of the denominator.
"HCF-min, LCM-max" โ HCF takes the minimum power of each prime; LCM takes the maximum. "H" for "humble" (smaller), "L" for "large."
- โ- The number-system hierarchy tells you which operations stay within a set (closure) and which leave it.
- โ- Divisibility rules for 2โ11 let you test factors mentally without long division.
- โ- LCM and HCF have a reciprocal relationship via the golden property; prime factorisation makes both fast to find.
- โ- Unit-digit problems reduce to cycle patterns of length โค 4; use exponent mod cycle-length.
- โ- Trailing zeros in n! count factors of 5 โ apply Legendre's formula, not a count of 10s.
โก Speed Tricks & Shortcuts
- HCF ร LCM = product of the two numbers (works for exactly two numbers).
- Fractions: HCF = HCF(numerators)/LCM(denominators); LCM = LCM(numerators)/HCF(denominators).
- "Largest number that divides a, b, c leaving the same remainder r" โ HCF of the differences (aโb, bโc).
- "Smallest number leaving remainder r with each divisor" โ LCM(divisors) + r.
The fraction rule is easy to flip โ remember HCF uses HCF-of-tops over LCM-of-bottoms; swapping them is the usual slip.
HCF and LCM โ Revision Notes
Quick-revision notes for HCF and LCM โ the must-know points for SSC CGL Tier-I/II.
- HCF (Highest Common Factor) is the largest number dividing all given numbers; LCM is the smallest number divisible by all.
- For two numbers: HCF ร LCM = product of the two numbers.
- Find HCF/LCM by prime factorisation or the division method.
- HCF of fractions = HCF(numerators)/LCM(denominators); LCM of fractions = LCM(numerators)/HCF(denominators).
- LCM is used for "bells ring together" and "same time" problems; HCF for "largest that divides" or "greatest measure".
- Co-prime numbers have HCF = 1, so their LCM equals their product.
HCF and LCM โ Flashcards (SSC CGL)
Cover the answer, recall, then check. 7 cards on the must-know HCF and LCM facts for SSC CGL.
Q1. State the relation between HCF and LCM of two numbers.
A1. HCF ร LCM = product of the two numbers.
Q2. Find the HCF and LCM of 12 and 18.
A2. HCF = 6, LCM = 36 (check: 6 ร 36 = 216 = 12 ร 18).
Q3. What is the HCF of two co-prime numbers?
A3. 1 (so their LCM equals their product).
Q4. Formula for HCF of two fractions?
A4. HCF of numerators divided by LCM of denominators.
Q5. Which of HCF/LCM is used for "bells ringing together" problems?
A5. LCM.
Q6. The LCM of 4 and 6 is?
A6. 12.
Q7. If HCF of two numbers is 8 and LCM is 48, and one number is 16, find the other.
A7. 24 โ product = 8 ร 48 = 384, so 384 รท 16 = 24.
HCF and LCM โ Formula Sheet
Key formulas
- HCF ร LCM = product of the two numbers (for two numbers only).
- HCF = product of lowest powers of common primes; LCM = product of highest powers of all primes.
- HCF of fractions = HCF(numerators)/LCM(denominators); LCM of fractions = LCM(numerators)/HCF(denominators).
- Largest number dividing a, b, c leaving same remainder r: HCF(aโb, bโc, cโa).
- Smallest number leaving remainder r with each divisor: LCM(divisors) + r.
- Co-prime numbers โ HCF = 1, LCM = product.
- โ- HCF ร LCM = product of the two numbers.
- โ- HCF(fractions) = HCF(num)/LCM(den).
- โ- Same remainder โ HCF of successive differences.
- โ- Co-prime โ HCF = 1, LCM = product.
Usage: use HCFรLCM = product to find the missing quantity when three of four are known.
HCF and LCM โ Worked Example
Worked Example
Problem: The product of two numbers is 2028 and their HCF is 13. How many distinct pairs of such numbers are possible?
Solution:
Let the two numbers be 13a and 13b, where a and b are coprime (their only common factor is 1, since 13 is the HCF).
Product = 13a ร 13b = 169ab = 2028
So ab = 2028 รท 169 = 12.
Now list coprime factor pairs of 12:
(1, 12) โ HCF 1 โ
(2, 6) โ HCF 2 โ (not coprime)
(3, 4) โ HCF 1 โ
So the valid coprime pairs are (1, 12) and (3, 4), giving numbers (13, 156) and (39, 52).
Answer: 2 distinct pairs are possible.
- โ- Write the numbers as HCF ร coprime parts: 13a and 13b.
- โ- Product = HCFยฒ ร (a ร b), so ab = product รท HCFยฒ.
- โ- Count only coprime factor pairs โ non-coprime pairs would raise the HCF above the given value.