Last week, Hamed learned about a new type of equations in his math class called Modular Equations. Lets define i modulo j as the remainder of division of i by j and denote it by $i \operatorname{mod} j$. A Modular Equation, as Hamed's teacher described, is an equation of the form $a \operatorname{mod} x = b$ in which a and b are two non-negative integers and x is a variable. We call a positive integer x for which $a \operatorname{mod} x = b$ a solution of our equation.

Hamed didn't pay much attention to the class since he was watching a movie. He only managed to understand the definitions of these equations.

Now he wants to write his math exercises but since he has no idea how to do that, he asked you for help. He has told you all he knows about Modular Equations and asked you to write a program which given two numbers a and b determines how many answers the Modular Equation $a \operatorname{mod} x = b$ has.


-----Input-----

In the only line of the input two space-separated integers a and b (0 ≤ a, b ≤ 10^9) are given.


-----Output-----

If there is an infinite number of answers to our equation, print "infinity" (without the quotes). Otherwise print the number of solutions of the Modular Equation $a \operatorname{mod} x = b$.


-----Examples-----
Input
21 5

Output
2

Input
9435152 272

Output
282

Input
10 10

Output
infinity



-----Note-----

In the first sample the answers of the Modular Equation are 8 and 16 since $21 \operatorname{mod} 8 = 21 \operatorname{mod} 16 = 5$

Difficulty: MEDIUM_HARD

Solutions:
(a, b) = map(int, input().split())
count = 0
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	for i in range(1, int((a - b) ** 0.5) + 1):
		if (a - b) % i == 0:
			if i > b:
				count += 1
			if (a - b) // i != i and (a - b) // i > b:
				count += 1
	print(count)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	dif = a - b
	i = 1
	result = 0
	while i * i <= dif:
		if dif % i == 0:
			if i > b:
				result += 1
			if dif // i > b and i * i != dif:
				result += 1
		i += 1
	print(result)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	cnt = 0
	p = 1
	c = a - b
	while p * p < c:
		if c % p == 0 and c // p > b:
			cnt += 1
			if p > b:
				cnt += 1
		p += 1
	if p * p == c and p > b:
		cnt += 1
	print(cnt)


import random
(a, b) = map(int, input().split())

def sums(s, l, b):
	if s > b:
		p = 1
		for x in l:
			p *= x[1] + 1
		return p
	if not l:
		return 0
	p = 0
	for i in range(l[0][1] + 1):
		p += sums(s * l[0][0] ** i, l[1:], b)
	return p

def naive(a, b):
	if a == b:
		return 'infinity'
	elif a < b:
		return 0
	else:
		count = 0
		for x in range(1, a + 1):
			if a % x == b:
				count += 1
		return count

def wise(a, b):
	if a == 1 and b == 0:
		return 1
	if a == b:
		return 'infinity'
	else:
		d = a - b
		factors = {}
		i = 2
		while i * i <= d:
			if d % i == 0:
				factors.setdefault(i, 0)
				factors[i] += 1
				d //= i
			else:
				i += 1
		factors.setdefault(d, 0)
		factors[d] += 1
		return sums(1, list(factors.items()), b)
print(wise(a, b))


(a, b) = map(int, input().split(' '))
if a == b:
	print('infinity\n')
else:
	(s, k) = (0, 1)
	while k * k <= a - b:
		s += ((a - b) % k == 0 and k > b) + ((a - b) % k == 0 and (a - b) // k > b and ((a - b) // k != k))
		k += 1
	print(s, '\n')


from __future__ import print_function
from collections import *
from sys import stdin
from heapq import *
from math import *
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gfl = lambda : [float(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
rr = lambda x: reversed(range(x))
mod = int(1000000000.0) + 7
inf = float('inf')
(a, b) = gil()
if a <= b:
	print('0' if a < b else 'infinity')
	exit()
a -= b
ans = 0
for i in range(1, int(sqrt(a)) + 1):
	if a % i:
		continue
	j = a // i
	if min(i, j) > b and i != j:
		ans += 2
	elif max(i, j) > b:
		ans += 1
print(ans)


import math
(n, m) = input().split(' ')
(n, m) = (int(n), int(m))
if n == m:
	print('infinity')
elif n < m:
	print(0)
else:
	temp = n - m
	lst = []
	for i in range(1, int(math.sqrt(temp)) + 1):
		if temp % i == 0:
			lst.append(i)
			x = int(temp / i)
			if i != x:
				lst.append(x)
	total = 0
	for i in lst:
		if n % i == m:
			total += 1
	print(total)


(a, b) = list(map(int, input().split()))
a2 = a - b
if a2 == 0:
	print('infinity')
else:
	Count = 0
	i = 1
	while i ** 2 <= a2:
		Count += (a2 % i == 0 and i > b) + (a2 % i == 0 and a2 // i > b and (i != a2 // i))
		i += 1
	print(Count)


from math import sqrt, ceil
(a, b) = map(int, input().split())
e = a - b
if e == 0:
	print('infinity')
elif e < 0:
	print(0)
else:
	i = 1
	marked = False
	t = e
	ans = 0
	down = 0
	while i < ceil(sqrt(e)):
		if e % i == 0:
			t = e // i
			if t > b:
				ans += 1
				if i <= b:
					down += 1
		if e // i <= b:
			marked = True
			break
		i += 1
	if not marked:
		ans = ans * 2 - down
		if sqrt(e) == ceil(sqrt(e)) and sqrt(e) != b:
			ans += 1
	print(ans)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
else:
	(k, val) = (1, 0)
	while k * k <= a - b:
		if (a - b) % k == 0:
			val += sum((1 for x in {k, (a - b) // k} if x > b))
		k += 1
	print(val)


(a, b) = [int(x) for x in input().split()]
i = 1
a -= b
count = 0
if a == 0:
	print('infinity')
else:
	while i * i <= a:
		if a % i == 0:
			if i * i == a:
				count += 1
			else:
				count += 2
				if a // i <= b:
					count -= 1
			if i <= b:
				count -= 1
		i += 1
	print(count)


(numero_a, numero_b) = map(int, input().split())
if numero_a > numero_b:
	numero_a -= numero_b
	aux = 1
	num_de_solucoes = 0
	while aux * aux <= numero_a:
		if numero_a % aux == 0:
			if aux > numero_b:
				num_de_solucoes += 1
			if numero_a / aux > numero_b and aux * aux != numero_a:
				num_de_solucoes += 1
		aux += 1
	print(num_de_solucoes)
elif numero_a == numero_b:
	print('infinity')
else:
	print(0)


from math import sqrt

def factors(n):
	root = sqrt(n)
	start = int(root)
	if n % 2 == 0:
		step = -1
	else:
		step = -2
		start = start // 2 * 2 + 1
	if root.is_integer():
		yield int(root)
		start += step
	for x in range(start, 0, step):
		if n % x == 0:
			yield x
			yield (n // x)
(a, b) = map(int, input().split())
if b > a:
	print('0')
elif b == a:
	print('infinity')
else:
	arr = list(factors(a - b))
	count = 0
	for i in arr:
		if i > b:
			count += 1
	print(count)


(a, b) = map(int, input().split())
a -= b
i = 1
ans = 0
while i ** 2 <= a:
	if a % i != 0:
		i += 1
		continue
	if i > b:
		ans += 1
	if i * i != a and a // i > b:
		ans += 1
	i += 1
print(ans if a + b != b else 'infinity')


(a, b) = map(int, input().split())
if b > a:
	print(0)
elif a == b:
	print('infinity')
else:
	ds = []
	r = int((a - b) ** 0.5)
	if a - b == r * r:
		ds.append(r)
	else:
		r += 1
	for d in range(1, r):
		if (a - b) % d == 0:
			ds.append(d)
			ds.append((a - b) // d)
	print(len([d for d in ds if d > b]))


a = input().split()
n = int(a[0])
m = int(a[1])
ans = 0
if n < m:
	print('0')
elif n == m:
	print('infinity')
else:
	i = 1
	n = n - m
	while i * i < n:
		if n % i == 0:
			if i > m:
				ans = ans + 1
			if n / i > m:
				ans = ans + 1
		i = i + 1
	s = int(n ** 0.5)
	if s ** 2 == n and s > m:
		ans = ans + 1
	print(ans)


(a, b) = map(int, input().split())
x = a - b
if x == 0:
	print('infinity')
elif x < 0:
	print(0)
else:
	i = 1
	cont = 0
	while i * i <= x:
		if x % i == 0:
			if a % i == b:
				cont += 1
			if x / i != i and a % (x / i) == b:
				cont += 1
		i += 1
	print(cont)


import math
(a, b) = tuple((int(i) for i in input().split()))
k = a - b
if k == 0:
	print('infinity')
elif k < 0:
	print(0)
else:
	ans = 0
	for i in range(1, math.ceil(math.sqrt(k))):
		if k % i == 0:
			if i > b:
				ans += 1
			if k // i > b and k // i != i:
				ans += 1
	if math.floor(math.sqrt(k)) ** 2 == k and math.floor(math.sqrt(k)) > b:
		ans += 1
	print(ans)


import math
(a, b) = map(int, input().split())
if a == b:
	print('infinity')
else:
	num = abs(a - b)
	i = 1
	count = 0
	while i < int(math.sqrt(num)) + 1:
		if num % i == 0:
			if i > b:
				count += 1
			if num / i > b and i * i != num:
				count += 1
		i += 1
	print(count)


import fractions
import math

def lcm(a, b):
	return a * b / fractions.gcd(a, b)

def make_divisors(n):
	divisors = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			divisors.append(i)
			if i != n // i:
				divisors.append(n // i)
	return divisors

def main():
	(a, b) = map(int, input().split())
	if a < b:
		print(0)
	elif a == b:
		print('infinity')
	else:
		l = make_divisors(a - b)
		ans = 0
		for n in l:
			if a % n == b:
				ans += 1
		print(ans)
main()


(a, b) = map(int, input().split(' '))
diff = a - b
if a == 0 or b == 0 or diff == 0 or (b > a):
	if b > a:
		print(0)
	elif a == 0 and b == 0:
		print('infinity')
	elif a == 0:
		print(0)
	elif b == 0:
		factors = []
		for i in range(1, int(diff ** 0.5) + 1):
			if diff % i == 0:
				factors.append(i)
				factors.append(int(diff / i))
		factors = list(set(factors))
		facts = [i for i in factors if i > b]
		print(len(facts))
	else:
		print('infinity')
else:
	b = b % a
	diff = a - b
	factors = []
	for i in range(1, int(diff ** 0.5) + 1):
		if diff % i == 0:
			factors.append(i)
			factors.append(int(diff / i))
	factors = list(set(factors))
	facts = [i for i in factors if i > b]
	print(len(facts))


def input_split(f):
	return map(f, input().split())

def main():
	(a, b) = input_split(int)
	if a == b:
		print('infinity')
	elif a < b:
		print(0)
	else:
		(s, a) = (0, a - b)
		y = int(a ** 0.5)
		for x in range(1, y + 1):
			if a % x == 0:
				if x > b:
					s += 1
				if a > b * x:
					s += 1
		if y > b and y * y == a:
			s -= 1
		print(str(s))
main()


(a, b) = map(int, input().split())
r = 0
c = 1
v = a - b
while c * c <= v:
	if v % c == 0:
		r += (c > b) + (c * c < v and v > b * c)
	c += 1
print('infinity' if a == b else r)


var = input()
(a, b) = var.split()
a = int(a)
b = int(b)
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	a -= b
	i = 1
	result = 0
	while i * i <= a:
		if a % i == 0:
			if i > b:
				result += 1
			if a / i > b and i * i != a:
				result += 1
		i += 1
	print(result)


(a, b) = [int(x) for x in input().split()]
if a < b:
	print(0)
elif a == b:
	print('infinity')
else:
	x = a - b
	i = 1
	ans = 0
	while i * i <= x:
		if not x % i:
			if x // i == i and i > b:
				ans += 1
			else:
				if i > b:
					ans += 1
				if x // i > b:
					ans += 1
		i += 1
	print(ans)


(a, b) = [int(i) for i in input().split()]
o = a - b
sum = 0
l = 1
if o > 0:
	for i in range(1, int(o ** 0.5) + l):
		if o % i == 0:
			if o // i > b and i > b:
				sum += 2
				if i == o // i:
					sum -= 1
			if o // i > b and i <= b or (o // i <= b and i > b):
				sum += 1
if o == 0:
	print('infinity')
else:
	print(sum)


(x, y) = list(map(int, input().split()))
n = x - y
j = n
c = 0
if j < 0:
	print(c)
elif j == 0:
	print('infinity')
else:
	result_set = set()
	sqrtn = int(n ** 0.5)
	for i in range(1, sqrtn + 1):
		(q, r) = (n / i, n % i)
		if r == 0:
			if q > y:
				result_set.add(q)
			if i > y:
				result_set.add(i)
	print(len(result_set))


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
else:
	res = 0
	if a > b:
		dif = a - b
		i = 1
		while 1:
			if dif % i == 0:
				if dif // i > b and dif // i is not i:
					res += 1
				if i > b:
					res += 1
			i += 1
			if i * i > dif:
				break
	print(res)


x = input('').split(' ')
a = int(x[0])
b = int(x[1])
list = []
answer = 0
if a == b:
	print('infinity')
else:
	value = 1
	while value ** 2 <= a - b:
		if (a - b) % value == 0:
			list.append(value)
			if value != (a - b) / value:
				list.append((a - b) / value)
		value = value + 1
	for value in list:
		if value > b:
			answer = answer + 1
	print(answer)


(a, r) = map(int, input().split())
(ans, c, kx) = (0, 1, a - r)
while c * c <= kx:
	if not kx % c:
		ans += (c > r) + (c * c < kx and kx > c * r)
	c += 1
print((ans, 'infinity')[a == r])


(a, b) = list(map(int, input().split()))
if a < b:
	print(0)
elif a == b:
	print('infinity')
elif a > b:
	cnt = 0
	for i in range(1, int((a - b) ** 0.5) + 1):
		if (a - b) % i == 0:
			if i > b:
				cnt += 1
			if (a - b) / i > b and i * i != a - b:
				cnt += 1
	print(cnt)


from math import sqrt
(n_to_mod, remainder) = input().split()
n_to_mod = int(n_to_mod)
remainder = int(remainder)

def verify_n_divisors(array_div_population):
	if array_div_population == []:
		return 0
	n_of_divisors = 1
	for idx_div in range(len(array_div)):
		n_of_divisors *= array_div_population[idx_div] + 1
	return n_of_divisors

def is_at_array_div(divisor, array_div, array_div_population):
	for div_idx in range(len(array_div)):
		if divisor == array_div[div_idx]:
			array_div_population[div_idx] += 1
			return
	array_div_population.append(1)
	array_div.append(divisor)

def get_divisors(array_div, array_div_population):
	divisors = [1]
	for div_idx in range(len(array_div)):
		divisors = multiply_fact_n_times(divisors, array_div[div_idx], array_div_population[div_idx])
	return divisors

def multiply_fact_n_times(divisors, factor, n_times):
	new_divisors = []
	for div in divisors:
		result = div * factor
		new_divisors.append(result)
	divisors = divisors + new_divisors
	while n_times - 1 > 0:
		final_divisors = []
		for div in new_divisors:
			result = div * factor
			final_divisors.append(result)
		divisors = divisors + final_divisors
		new_divisors = final_divisors
		n_times -= 1
	return divisors
if n_to_mod == remainder:
	print('infinity')
elif n_to_mod <= remainder:
	print(0)
else:
	array_div = []
	array_div_population = []
	factor_count = 2
	plus_two = False
	first_module = n_to_mod - remainder
	max_size = sqrt(first_module)
	count_modular_times = 0
	module_controller = 2
	while first_module != 1:
		if first_module % factor_count == 0:
			first_module //= factor_count
			is_at_array_div(factor_count, array_div, array_div_population)
		else:
			if not plus_two:
				factor_count += 1
				plus_two = True
			else:
				factor_count += 2
			if factor_count > max_size:
				factor_count = first_module
	divisors = list(sorted(get_divisors(array_div, array_div_population)))
	for divisor in divisors:
		if divisor > remainder:
			count_modular_times += 1
	print(count_modular_times)


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(a, b) = list(map(int, input().split()))
if a < b:
	print(0)
elif a == b:
	print('infinity')
elif a > b:
	cnt = 0
	for i in range(1, int((a - b) ** 0.5) + 1):
		if (a - b) % i == 0:
			if i > b:
				cnt += 1
			if (a - b) / i > b and i * i != a - b:
				cnt += 1
	print(cnt)


tmp = input().split()
a = int(tmp[0])
b = int(tmp[1])
a -= b
if a == 0:
	print('infinity')
else:
	ans = 0
	i = 1
	while i * i < a:
		if a % i == 0:
			if i > b:
				ans += 1
			if a / i > b:
				ans += 1
		i += 1
	if i * i == a and i > b:
		ans += 1
	print(ans)


from math import sqrt
(a, b) = map(int, input().split())
sub = abs(a - b)
if sub == 0:
	print('infinity')
elif b > a:
	print(0)
else:
	i = 1
	cont = 0
	while i <= sqrt(sub):
		if sub % i == 0:
			if i > b and a % i == b:
				cont += 1
			if sub // i != i and a % (sub // i) == b:
				cont += 1
		i += 1
	print(cont)


(a, b) = map(int, input().split())
if b > a:
	print(0)
elif b == a:
	print('infinity')
else:
	c = a - b
	l = []
	for i in range(1, int(c ** 0.5) + 1):
		if c % i == 0:
			l.append(i)
			if i != c // i:
				l.append(c // i)
	ans = 0
	for i in l:
		if a % i == b:
			ans += 1
	print(ans)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
	exit()
(a, res) = (a - b, 0)
for i in range(1, a + 1):
	if i * i > a:
		break
	if a % i != 0:
		continue
	if i != a // i and a // i > b:
		res += 1
	if i > b:
		res += 1
print(res)


def printDivisors(n):
	i = 1
	l = []
	c = 0
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				l.append(i)
				c += 1
			else:
				l.append(i)
				l.append(n // i)
				c += 2
		i = i + 1
	return (l, c)
(a, b) = map(int, input().split())
if a == b:
	print('infinity')
else:
	if a == 0:
		print(0)
		exit()
	(l, c) = printDivisors(a - b)
	ans = 0
	for p in l:
		if p <= b:
			ans += 1
	print(c - ans)


import math
(a, b) = map(int, input().rstrip().split())
if a == b:
	print('infinity')
if a < b:
	print(0)
if a != b and a > b:
	total = 0
	c = a - b
	x = 0
	for i in range(1, math.floor(math.sqrt(c)) + 1):
		if c % i == 0:
			if i > b:
				total += 1
			if i != int(c / i) and int(c / i) > b:
				total += 1
	print(total)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
	exit(0)
x = abs(a - b)
ans = 0
for xx in range(1, int(x ** 0.5) + 1):
	if x % xx == 0:
		if a % xx == b:
			ans += 1
		if xx * xx != x:
			if a % (x // xx) == b:
				ans += 1
print(ans)


import math
(a, b) = map(int, input().split())
k = 0
if a == b:
	print('infinity')
elif b > a:
	print(0)
else:
	i = 1
	while i * i <= a - b:
		if (a - b) % i == 0 and i > b:
			k += 1
		if (a - b) // i > b and (a - b) % i == 0 and (i * i != a - b):
			k += 1
		i += 1
	print(k)


import math
(a, b) = map(int, input().split(' '))
if a == b:
	print('infinity')
elif b > a:
	print(0)
else:
	pivor = a - b
	multipos = 0
	for i in range(1, int(math.sqrt(pivor)) + 1):
		if pivor % i == 0:
			if pivor / i == i and i > b or (i <= b and pivor / i > b):
				multipos += 1
			elif pivor / i > b and i > b:
				multipos += 2
	print(multipos)


import math
(n, m) = map(int, input().split())
a = n - m
ans = 0
if m == n:
	print('infinity')
	exit()
if a < 0:
	print(0)
	exit()
for i in range(1, int(math.sqrt(a)) + 1, 1):
	if a % i == 0:
		a1 = i
		a2 = a // i
		if a1 == a2 and a1 > m:
			ans += 1
			continue
		if a1 > m:
			ans += 1
		if a2 > m:
			ans += 1
print(ans)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	c = a - b
	s = [c // i for i in range(1, min(c, 40000)) if a % (c // i) == b] + [i for i in range(1, 40000) if a % i == b]
	s = set(s)
	print(len(s))


(N, T) = map(int, input().split())
if N < T:
	print(0)
elif N == T:
	print('infinity')
else:
	N -= T
	i = 1
	R = 0
	while i * i <= N:
		if N % i == 0:
			if i > T:
				R += 1
			if N / i > T and i * i != N:
				R += 1
		i += 1
	print(R)


def div(num):
	count = 0
	i = 1
	while i * i <= num:
		if num % i == 0:
			if num / i == i and i > b:
				count += 1
			else:
				if i > b:
					count += 1
				if num / i > b:
					count += 1
		i += 1
	return count
(a, b) = map(int, input().split())
sub = a - b
if sub == 0:
	print('infinity')
elif sub < 0:
	print(0)
else:
	print(div(a - b))


import math
(a, b) = map(int, input().split())
if a == b:
	print('infinity')
	exit()
if b > a:
	print(0)
	exit()

def fact(x):
	ans = []
	for i in range(1, int(math.sqrt(x)) + 1):
		if i == x // i:
			ans.append(i)
		else:
			ans.append(i)
			ans.append(x // i)
	return ans
ans = fact(a - b)
count = 0
for i in range(len(ans)):
	if ans[i] > b:
		if a % ans[i] == b:
			count += 1
print(count)


from sys import stdin
(a, b) = map(int, stdin.readline().split())
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	ans = 0
	i = 1
	bb = b
	b = a - b
	while i * i <= b:
		if b % i == 0:
			if i * i == b and i > bb:
				ans += 1
			else:
				if i > bb:
					ans += 1
				if b // i > bb:
					ans += 1
		i += 1
	print(ans)


(a, b) = [int(n) for n in input().split()]
c = a - b
x = 1
z = 0
if a == b:
	print('infinity')
else:
	while x ** 2 <= c:
		if c % x == 0:
			if x > b:
				z += 1
			if x ** 2 != c and c / x > b:
				z += 1
		x += 1
	print(z)


def printDivisors(n):
	ans = []
	for i in range(1, int(n ** 0.5 + 1)):
		if n % i == 0:
			if n // i == i:
				ans.append(i)
			else:
				ans.append(i)
				ans.append(n // i)
	return sorted(ans)
(a, b) = map(int, input().split())
print('infinity') if a == b else print(0) if a < b else print(sum((i > b for i in printDivisors(a - b))))


n = input().split(' ')
a = int(n[0])
b = int(n[1])
if a == b:
	print('infinity')
elif b > a:
	print(0)
else:
	k = a - b
	cont = 0
	i = 1
	while i * i <= k:
		if k % i == 0:
			if k / i == i and i > b:
				cont += 1
			else:
				if i > b:
					cont += 1
				if k / i > b:
					cont += 1
		i += 1
	print(cont)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
else:
	n = a - b
	i = 1
	k = 0
	while i ** 2 <= n:
		if n % i == 0:
			if i > b:
				k += 1
			if i ** 2 != n:
				if n // i > b:
					k += 1
		i += 1
	print(k)


import bisect
from itertools import accumulate, count
import os
import sys
import math
from decimal import *
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def SieveOfEratosthenes(n):
	prime = []
	primes = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if primes[p] == True:
			for i in range(p * p, n + 1, p):
				primes[i] = False
		p += 1
	for i in range(2, len(primes)):
		if primes[i] == True:
			prime.append(i)
	return prime

def primefactors(n):
	fac = []
	while n % 2 == 0:
		fac.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 2):
		while n % i == 0:
			fac.append(i)
			n = n // i
	if n > 1:
		fac.append(n)
	return fac

def factors(n):
	fac = set()
	fac.add(1)
	fac.add(n)
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			fac.add(i)
			fac.add(n // i)
	return list(fac)

def NcR(n, r):
	p = 1
	k = 1
	if n - r < r:
		r = n - r
	if r != 0:
		while r:
			p *= n
			k *= r
			m = math.gcd(p, k)
			p //= m
			k //= m
			n -= 1
			r -= 1
	else:
		p = 1
	return p

def Log2(x):
	if x == 0:
		return False
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))
(a, b) = map(int, input().split())
if a == 0 and b != 0:
	print(0)
elif b > a:
	print(0)
elif a == b:
	print('infinity')
else:
	c = a - b
	fac = factors(c)
	count = 0
	for i in range(0, len(fac)):
		if fac[i] > b:
			count += 1
	print(count)


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif a < b:
	print('0')
else:
	ans = 0
	for j in range(1, a - b + 1):
		if j * j > a - b:
			break
		if (a - b) / j == j and (a - b) % j == 0 and (j > b):
			ans += 1
		elif (a - b) % j == 0:
			if (a - b) / j > b:
				ans += 1
			if j > b:
				ans += 1
	print(ans)


(a, b) = input().split()
a = int(a)
b = int(b)
if a == b:
	print('infinity')
elif b > a:
	print(0)
else:
	quant = 0
	d = a - b
	i = 1
	while i * i <= d:
		if d % i == 0:
			if d / i == i and i > b:
				quant += 1
			else:
				if i > b:
					quant += 1
				if d / i > b:
					quant += 1
		i += 1
	print(quant)


(a, b) = map(int, input().split())
if a < b:
	print(0)
elif a == b:
	print('infinity')
else:
	l = []
	k = a - b
	use = set()
	for x in range(1, int(k ** 0.5) + 1):
		if k % x == 0 and x not in use:
			use.add(x)
			l.append(x)
			if k // x not in use:
				use.add(k // x)
				l.append(k // x)
	l.sort()
	cnt = 0
	for x in l:
		if x > b:
			cnt += 1
	print(cnt)


(n, x) = input().split(' ')
n = int(n)
x = int(x)

def solve(n, x):
	n = n - x
	i = 1
	counter = 0
	while i * i <= n:
		if n % i == 0:
			if i > x:
				counter += 1
			if n / i > x and i * i != n:
				counter += 1
		i = i + 1
	return counter
if n == x:
	print('infinity')
elif n < x:
	print(0)
else:
	print(solve(n, x))


def qtd_x(a, b):
	x = 0
	aux = a - b
	i = 1
	while i * i <= aux:
		if aux % i == 0:
			if aux / i == i and i > b:
				x += 1
			else:
				if i > b:
					x += 1
				if aux / i > b:
					x += 1
		i += 1
	return x
(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif b > a:
	print(0)
else:
	print(qtd_x(a, b))


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	(s, a) = (0, a - b)
	y = int(a ** 0.5)
	for x in range(1, y + 1):
		if a % x == 0:
			if x > b:
				s += 1
			if a > b * x:
				s += 1
	if y > b and y * y == a:
		s -= 1
	print(s)


import math
(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	x = a - b
	c = 0
	for i in range(1, int(math.sqrt(a)) + 1):
		if x % i == 0:
			if x // i == i:
				if i > b:
					c += 1
			else:
				if i > b:
					c += 1
				if x // i > b:
					c += 1
	print(c)


l1 = input().split()
l1 = [int(i) for i in l1]
x = l1[0]
y = l1[1]
if x == y:
	print('infinity')
else:
	x -= y
	mod = 0
	i = 1
	while i * i <= x:
		if x % i == 0:
			if i > y:
				mod += 1
			if x // i != i and x // i > y:
				mod += 1
		i += 1
	print(mod)


import math

def main():
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	if a == b:
		print('infinity')
		return
	if b > a:
		print(0)
		return
	num = a - b
	div = []
	for i in range(1, int(math.sqrt(num)) + 1):
		if num % i == 0:
			div.append(i)
			div.append(num // i)
	div = list(set(div))
	div = sorted(div)
	p = 0
	while p < len(div) and div[p] <= b:
		p += 1
	div = div[p:]
	print(len(div))
	return
main()


(a, b) = map(int, input().split())
if a == b:
	print('infinity')
elif a < b:
	print(0)
else:
	res = set()
	n = a - b
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			if i > b:
				res.add(i)
			if n // i > b:
				res.add(n // i)
	print(len(res))


import math, time
(a, b) = [int(i) for i in input().split()]
if a < b:
	print(0)
elif a == b:
	print('infinity')
else:

	def FindRequiredDivisors(x, b):
		y = 1
		ans = 0
		while y <= int(math.sqrt(x)):
			if x % y == 0:
				if y != int(x / y):
					if y > b:
						ans += 1
					if int(x / y) > b:
						ans += 1
				elif y == int(x / y) and y > b:
					ans += 1
			y += 1
		return ans
	print(FindRequiredDivisors(a - b, b))


(a, b) = list(map(int, input().split()))
if a < b:
	print(0)
elif a == b:
	print('infinity')
else:
	q = a - b
	i = 1
	r = 0
	while i * i < q:
		if q % i == 0:
			if i > b:
				r += 1
			if q // i > b:
				r += 1
		i += 1
	if i * i == q and i > b:
		r += 1
	print(r)


import math

def calculateDivisors(A, B):
	N = A - B
	noOfDivisors = 0
	a = math.sqrt(N)
	for i in range(1, int(a + 1)):
		if N % i == 0:
			if i > B:
				noOfDivisors += 1
			if N / i != i and N / i > B:
				noOfDivisors += 1
	return noOfDivisors

def numberOfPossibleWaysUtil(A, B):
	if A == B:
		return 'infinity'
	if A < B:
		return 0
	noOfDivisors = 0
	noOfDivisors = calculateDivisors(A, B)
	return noOfDivisors

def main_test():
	s = input().split(' ')
	if int(s[0]) + int(s[1]) + int(s[2]) >= 2:
		tt += 1
T = input().split(' ')
print(numberOfPossibleWaysUtil(int(T[0]), int(T[1])))


import math

def calculateDivisors(A, B):
	N = A - B
	noOfDivisors = 0
	a = math.sqrt(N)
	for i in range(1, int(a + 1)):
		if N % i == 0:
			if i > B:
				noOfDivisors += 1
			if N / i != i and N / i > B:
				noOfDivisors += 1
	return noOfDivisors

def possibiladesValidas(A, B):
	if A == B:
		return -1
	if A < B:
		return 0
	noOfDivisors = 0
	noOfDivisors = calculateDivisors(A, B)
	return noOfDivisors

def possibilidades(A, B):
	noOfSolutions = possibiladesValidas(A, B)
	if noOfSolutions == -1:
		print('infinity')
	else:
		print(noOfSolutions)
temp = input().split()
A = int(temp[0])
B = int(temp[1])
possibilidades(A, B)