Tavak and Seyyed are good friends. Seyyed is very funny and he told Tavak to solve the following problem instead of longest-path.

You are given l and r. For all integers from l to r, inclusive, we wrote down all of their integer divisors except 1. Find the integer that we wrote down the maximum number of times.

Solve the problem to show that it's not a NP problem.


-----Input-----

The first line contains two integers l and r (2 ≤ l ≤ r ≤ 10^9).


-----Output-----

Print single integer, the integer that appears maximum number of times in the divisors. 

If there are multiple answers, print any of them.


-----Examples-----
Input
19 29

Output
2

Input
3 6

Output
3



-----Note-----

Definition of a divisor: https://www.mathsisfun.com/definitions/divisor-of-an-integer-.html

The first example: from 19 to 29 these numbers are divisible by 2: {20, 22, 24, 26, 28}.

The second example: from 3 to 6 these numbers are divisible by 3: {3, 6}.

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Greedy algorithms


Solutions:
(a, b) = map(int, input().split())
print(2 if a != b else a)


(l, r) = map(int, input().split())
if l == r:
	print(l)
	exit(0)
print(2)


from math import *
(l, r) = map(int, input().split(' '))
x = r / l
if r == l:
	print(l)
else:
	print(2)


def fake_np():
	numbers = input().split()
	numbers = [int(i) for i in numbers]
	dic = {}
	if numbers[1] == numbers[0]:
		print(numbers[1])
		return
	print(2)
	return
	checking = numbers[1] - numbers[0]
	if checking > 1000:
		print(2)
		return
	maximum = 0
	output = 1
	for i in range(numbers[0], numbers[1]):
		temp = 2
		while True:
			if i % temp == 0:
				break
			else:
				temp += 1
		if temp not in dic:
			dic[temp] = 1
			if dic[temp] > maximum:
				maximum = dic[temp]
				output = temp
		else:
			dic[temp] += 1
			if dic[temp] > maximum:
				maximum = dic[temp]
				output = temp
	print(output)
fake_np()


nums = input()
nums = nums.split(' ')
nums = list(map(int, nums))
if nums[0] == nums[1]:
	print(nums[0])
elif nums[1] - nums[0] > 3:
	print('2')
elif nums[1] % 2 == 0 or nums[0] % 2 == 0:
	print('2')
else:
	print('3')


from sys import maxsize, stdout, stdin, stderr
import re
tup = lambda : map(int, stdin.readline().split())
I = lambda : int(stdin.readline())
lint = lambda : [int(x) for x in stdin.readline().split()]
S = lambda : stdin.readline().replace('\n', '').strip()

def grid(r, c):
	return [lint() for i in range(r)]

def debug(*args, c=6):
	print('\x1b[3{}m'.format(c), *args, '\x1b[0m', file=stderr)
(x, y) = tup()
if x == y:
	print(x)
	exit()
a = x // 2
b = y // 2
f = b - a
q = x // 3
w = y // 3
o = w - q
if x % 3 == 0:
	o += 1
if x % 2 == 0:
	f += 1
if o >= f:
	print(3)
else:
	print(2)


import math

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
(l, r) = map(int, input().split())
temp = 0
li = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]
if r != l:
	print('2')
	temp = 1
else:
	if isPrime(l):
		print(l)
		temp = 1
	if temp == 0:
		for i in range(15, 1, -1):
			x = pow(l, 1 / i)
			y = pow(round(x), i)
			if l == y:
				temp = 1
				print(round(x))
				break
	if temp == 0:
		for i in range(len(li)):
			if l % li[i] == 0:
				print(li[i])
				temp = 1
				break
	if temp == 0:
		print(l)


(l, r) = input().split()
(l, r) = (int(l), int(r))
if l == r:
	print(l)
else:
	print(2)


import sys

def solve():
	(l, r) = map(int, input().split())
	if l == r:
		ans = l
	else:
		ans = 2
	print(ans)
solve()


(l, r) = map(int, input().split())
if l % 2 == 0 or l < r:
	print(2)
else:
	print(l)


segment = input().split()
segment = [int(x) for x in segment]
variation = segment[1] - segment[0]
if variation == 0:
	print(segment[0])
else:
	print(2)


(n, k) = map(int, input().split())
if n == k:
	print(n)
else:
	print(2)


import sys
from collections import deque
from collections import defaultdict
(L, R) = sys.stdin.readline().strip().split(' ')
L = int(L)
R = int(R)
counts = {}
max_divisor_count = 1
max_divisor = 1

def primes(n, counts):
	global max_divisor, max_divisor_count
	fac = set()
	d = 2
	print('n: {}'.format(n))
	while d <= n:
		while n % d == 0:
			print('d: {}'.format(d))
			if d not in fac:
				if d not in counts:
					counts[d] = 1
				else:
					counts[d] += 1
				if counts[d] > max_divisor_count:
					max_divisor_count = counts[d]
					max_divisor = d
				fac.add(d)
			n //= d
		d += 1
	if n > 1:
		fac.add(n)
	return fac
if R == L:
	print(R)
else:
	print(2)


def f(l, r):
	if l == r:
		return r
	return 2
x = input().split()
l = int(x[0])
r = int(x[1])
print(f(l, r))


(l, r) = (int(i) for i in input().split())
if l - r == 0:
	print(l)
else:
	print(2)


(l, r) = map(int, input().split(' '))
x = 2
if l == r:
	x = r
print(x)


s = input().split()
l = int(s[0])
r = int(s[1])
if l == r:
	print(l)
else:
	print(2)


(n, s) = map(int, input().split())
if s - n > 1:
	print('2')
else:
	print(n)


(l, r) = map(int, input().split(' '))
if l == r and l % 2:
	print(l)
else:
	print(2)


def f(ll):
	(l, r) = ll
	return 2 if r > l else l
l = list(map(int, input().split()))
print(f(l))


(l, r) = [int(p) for p in input().split()]
from math import sqrt
from datetime import datetime
if r - l > 100:
	max_div = 2
else:
	st = datetime.now()
	ov_divisors = {}
	max_div = 0
	max_div_count = 0
	for i in range(l, r + 1):
		divisors = {}
		for j in range(1, int(sqrt(i)) + 2):
			if i % j == 0:
				if i not in divisors:
					divisors[i] = 0
				if j not in divisors:
					divisors[j] = 0
				divisors[i] = 1
				divisors[j] = 1
		for (div, val) in divisors.items():
			if val != 0:
				if div not in ov_divisors:
					ov_divisors[div] = 0
				ov_divisors[div] += 1
				if max_div_count < ov_divisors[div] and div != 1:
					max_div_count = ov_divisors[div]
					max_div = div
print(max_div)


(x, y) = map(int, input().split())
print(2 if x < y else x)


(a, b) = map(int, input().split())
two = three = five = seven = 0
if b - a > 0:
	print(2)
else:
	print(a)


from math import sqrt, ceil
(a, b) = map(int, input().split())
isPrime = [1 for i in range(0, ceil(sqrt(b) + 1))]
isPrime[0] = 0
isPrime[1] = 0
primes = []
for (i, p) in enumerate(isPrime):
	if p == 1:
		p2 = i * i
		while p2 < len(isPrime):
			isPrime[p2] = 0
			p2 += i
		primes.append(i)
maxres = 0
maxp = 0
for p in primes:
	res = b // p - a // p
	res += 1 if a % p == 0 else 0
	if res > maxres:
		maxres = res
		maxp = p
print(maxp if maxres > 0 else a)


import os
import sys
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))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	pass

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def lts(l):
	s = ''.join(map(str, l))
	return s

def stl(s):
	l = list(s)
	return l

def sq(a, target, arr=[]):
	s = sum(arr)
	if s == target:
		return arr
	if s >= target:
		return
	for i in range(len(a)):
		n = a[i]
		remaining = a[i + 1:]
		ans = sq(remaining, target, arr + [n])
		if ans:
			return ans

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

def nCr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
mod = int(1000000000.0) + 7

def ssinp():
	return input()

def iinp():
	return int(input())

def nninp():
	return map(int, input().split())

def llinp():
	return list(map(int, input().split()))

def p(xyz):
	print(xyz)

def p2(a, b):
	print(a, b)
import math
(l, r) = nninp()
if l == r:
	print(l)
else:
	print(2)


entrada = input()
a = int(entrada.split()[0])
b = int(entrada.split()[1])
if b > a:
	print(2)
else:
	print(a)


(l, r) = list(map(int, input().split()))
if l == r:
	print(l)
else:
	print(2)


(x, y) = map(int, input().split(' '))
c = d = 0
if x % 3 == 0 and y % 3 == 0:
	while 1:
		if x == y + 1:
			break
		if x % 2 == 0:
			c += 1
		if x % 3 == 0:
			d += 1
		x += 1
	if c >= d:
		print(2)
	else:
		print(3)
elif x == y:
	print(x)
else:
	print(2)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def main():
	(l, r) = LI()
	if l == r:
		return l
	return 2
print(main())


import sys
read = lambda : sys.stdin.readline().rstrip()
readi = lambda : int(sys.stdin.readline())
writeln = lambda x: sys.stdout.write(str(x) + '\n')
write = lambda x: sys.stdout.write(x)
(l, r) = map(int, read().split())
if l % 2 and r % 2:
	if l == r:
		writeln(l)
	else:
		writeln(2)
else:
	writeln(2)


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
(l, r) = R()
if l == r:
	print(l)
else:
	print('2')


(a, b) = tuple(input().split(' '))
if int(a) - int(b) == 0:
	print(a)
else:
	print('2')


(l, r) = [int(x) for x in input().split()]
(c2, c3) = (0, 0)
if l == r:
	print(l)
else:
	print(2)


def not_np(l, r):
	if l == r:
		return r
	return 2
(L, R) = [int(i) for i in input().split()]
print(not_np(L, R))


N = input()
N = N.split()
l = int(N[0])
r = int(N[1])
if l == r:
	print(l)
else:
	print('2')


(a, b) = input().split()
print(a if a == b else 2)


from sys import stdin, stdout
(n, m) = map(int, stdin.readline().split())
if n == m:
	ans = n
else:
	ans = 2
stdout.write(str(ans))


(left, right) = map(int, input().split())
if left == right:
	print(left)
else:
	print(2)


(a, b) = list(map(int, input().split()))
if a == b:
	res = a
else:
	res = 2
print(res)


(m, n) = map(int, input().split())
if m == n:
	print(m)
else:
	print(2)


(l, r) = [int(x) for x in input().split(' ')]
if l == r:
	print(l)
else:
	print(2)


def main():
	(a, b) = map(int, input().split())
	print((a, 2)[a < b])
main()


L = [int(x) for x in input().split()]
if L[0] == L[1]:
	print(L[0])
else:
	print(2)


(n, m) = map(int, input().split())
if n % 3 == 0 and m - n == 3:
	print(3)
elif m - n == 0:
	print(m)
else:
	print(2)


(a, b) = map(int, input().split())
c = a % 2
if c != 0:
	c = a - c + 2
else:
	c = a
d = a % 3
if d != 0:
	d = a - d + 3
else:
	d = a
e = b % 2
if e != 0:
	e = b - e
else:
	e = b
f = a % 3
if f != 0:
	f = b - f
else:
	f = b
k1 = (e - c) // 2 + 1
k2 = (f - d) // 3 + 1
if a == b:
	print(a)
elif k1 >= k2:
	print(2)
else:
	print(3)


[k, p] = [int(i) for i in input().split()]
if k == p:
	print(k)
else:
	print(2)


(l, r) = list(map(int, input().split()))
if l != r:
	print(2)
else:
	for i in range(1, int(l ** 0.5) + 1):
		if i * (l // i) == l:
			print(l // i)
			break


(a, b) = map(int, input().split())
if a == 3 and b in range(6, 8):
	print(3)
elif a == b:
	print(a)
else:
	print(2)


import math as mt
import sys, string, bisect
input = sys.stdin.readline
import random
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
d = defaultdict(int)
(l, r) = M()
if l == r:
	print(l)
else:
	print(2)


(n, m) = map(int, input().split())
l = m - n
if l >= 1:
	print(2)
else:
	print(m)


(l, r) = map(int, input().split())
(l1, r1) = (l, r)
if l == r:
	print(l)
else:
	print(2)


(l, r) = map(int, input().strip().split())
if l != r:
	print(2)
else:
	print(l)


(l, r) = input().split()
l = int(l)
r = int(r)
if l == r and l % 2 != 0:
	print(l)
else:
	print(2)


(l, r) = map(int, input().strip().split())
if l == r and l % 2 != 0:
	print(l)
else:
	print(2)


def divisor(l, r):
	if l == r:
		return l
	else:
		return 2
(l, r) = list(map(int, input().split()))
print(divisor(l, r))


s = input().split(' ')
a = int(s[0])
b = int(s[1])
if a != b:
	print(2)
elif a == b and a % 2 == 0:
	print(2)
else:
	print(a)


[l, r] = list(map(int, input().split()))
if l == r:
	d = 2
	while d * d <= l:
		if l % d == 0:
			print(d)
			exit(0)
		d += 1
	print(l)
	exit(0)
print('2')


inp = input().split()
n = int(inp[0])
m = int(inp[1])
if n == m:
	print(n)
else:
	print(2)


import sys
(a, b) = map(int, input().split())
count_divisible_by_two = 0
divisible_three = 0
if a == b:
	print(a)
	sys.exit()
elif a > 10000 and b > 10000:
	print(2)
	sys.exit()
elif b > 10000:
	print(2)
	sys.exit()
for i in range(a, b + 1):
	if i % 2 == 0:
		count_divisible_by_two += 1
	elif i % 3 == 0:
		divisible_three += 1
if a == 3 and b == 6:
	print(3)
	sys.exit()
	print(2)
	sys.exit()
elif count_divisible_by_two > divisible_three:
	print(2)
elif count_divisible_by_two < divisible_three:
	print(3)
elif count_divisible_by_two == divisible_three:
	print(2)


def get_key(dict, value):
	for (a, b) in dict.items():
		if b == value:
			return a
from collections import Counter
(l, r) = [int(el) for el in input().split(' ')]
lst_1 = []
if l % 2 == 0 or r % 2 == 0:
	print(2)
elif l == r:
	print(l)
else:
	for num in range(l, r + 1):
		for i in range(2, 4):
			if num % i == 0:
				lst_1.append(i)
	quantity = Counter(lst_1)
	print(get_key(quantity, max(quantity.values())))


numeros = [int(i) for i in input().split()]
numeros.sort()
if numeros[1] == numeros[0]:
	if numeros[1] % 2 == 0:
		print('2')
	else:
		print(numeros[1])
else:
	print('2')


import sys, math
(l, r) = map(int, sys.stdin.readline().split())
if l != r:
	print('2')
elif l % 2 == 0:
	print('2')
else:
	print(l)


import sys

def solve():
	(num1, num2) = map(int, input().split())
	if num1 == num2:
		print(num1)
	else:
		print(2)
solve()


def solve():
	(n, k) = map(int, input().split())
	if n == k:
		return n
	return 2
print(solve())


(l, r) = [int(i) for i in input().split(' ')]
if r + 1 - l > 3:
	print(2)
elif l == r:
	print(l)
else:
	divs = []
	for number in range(l, r + 1):
		div = 2
		while div <= number ** 0.5:
			if number % div == 0:
				divs.append(div)
			div += 1
	if len(divs) == 0:
		print(2)
	else:
		print(max(set(divs), key=divs.count))


def mp():
	return map(int, input().split())

def lt():
	return list(map(int, input().split()))

def pt(x):
	print(x)

def ip():
	return input()

def it():
	return int(input())

def sl(x):
	return [t for t in x]

def spl(x):
	return x.split()

def aj(liste, item):
	liste.append(item)

def bin(x):
	return '{0:b}'.format(x)

def listring(l):
	return ' '.join([str(x) for x in l])

def ptlist(l):
	print(' '.join([str(x) for x in l]))
(l, r) = mp()
if r != l:
	pt(2)
else:
	pt(r)


def main():
	(l, r) = input().strip().split()
	l = int(l)
	r = int(r)
	x = 0
	y = 0
	if l == r:
		print(l)
	else:
		print(2)
main()


(l, r) = [int(k) for k in input().split()]
if l != r:
	print(2)
else:
	print(l)


a = list(map(int, input().rstrip().split()))
if a[0] == a[-1]:
	print(a[0])
else:
	print('2')


import math

def solve():
	(l, r) = list((int(x) for x in input().split()))
	ans = l
	mx = 1
	for i in range(2, 100):
		cnt = r // i - (l - 1) // i
		if mx < cnt:
			mx = cnt
			ans = i
	print(ans)

def main():
	solve()
	exit(0)
main()


(l, r) = list(map(int, input().split()))
print((l, 2)[l < r])


tmp = input()
tmp = tmp.split(' ')
l = int(tmp[0])
r = int(tmp[1])
if l == r:
	print(l)
else:
	print(2)


(l, r) = list(map(int, input().split()))

def prime(num):
	n1 = num - 1
	n2 = num + 1
	if n1 % 6 == 0 or n2 % 6 == 0:
		return True
	return False
if l == r:
	if prime(l) or l == 3:
		print(l)
	else:
		print(2)
else:
	print(2)


(l, r) = map(int, input().split())
print(2 if r - l + 1 >= 2 else l)


(l, r) = map(int, input().split())
if l % 3 == 0 and r == l + 3:
	print(3)
elif l == r:
	print(l)
else:
	print(2)


numbers = input()
(a, b) = numbers.split(' ')
a = int(a)
b = int(b)
c = b - a
list1 = []
if c < 10000:
	if a < 10000:
		for i in range(c + 1):
			doke = a + i
			list1.append(doke)
			for ii in range(2, (doke + 1) // 2):
				if doke % ii == 0:
					list1.append(ii)
		list1.sort()
		list2 = []
		for i in range(len(list1)):
			nu = list1.count(list1[i])
			list2.append(nu)
		ma = max(list2)
		ind = list2.index(ma)
		answer = list1[ind]
	else:
		for i in range(c + 1):
			doke = a + i
			list1.append(doke)
			for ii in range(2, 100):
				if doke % ii == 0:
					list1.append(ii)
		list1.sort()
		list2 = []
		for i in range(len(list1)):
			nu = list1.count(list1[i])
			list2.append(nu)
		ma = max(list2)
		ind = list2.index(ma)
		answer = list1[ind]
else:
	answer = 2
print(answer)


(x, y) = map(int, input().split())
t = []
d = 0
if x != y and (x > 100 or y > 100):
	print(2)
elif x == y:
	print(x)
else:
	for i in range(x, y + 1):
		for j in range(2, x + 1):
			if i % j == 0:
				t.append(j)
				d = max(t.count(j), d)
	t.sort()
	for i in t:
		if t.count(i) == d:
			d = i
			break
	print(d)


(x, y) = map(int, input().split())
if x % 3 == 0 and y % 3 == 0 and (y - x == 3):
	print(3)
	exit(0)
elif x == y:
	print(x)
else:
	print(2)


line = [int(l) for l in input().split(' ')]
if line[0] == line[1]:
	print(line[0])
else:
	print(2)


(l, r) = map(int, input().split())
(d, t) = (0, 0)
if l == r:
	print(l)
else:
	print(2)


from math import sqrt
[l, r] = list(map(int, input().split()))

def fact(k):
	mx = 0
	x = -1
	for i in range(2, int(sqrt(k)) + 2):
		if k % i == 0:
			j = 0
			while k % i == 0:
				k /= i
				j += 1
			if j > mx:
				mx = j
				x = i
		if x == -1:
			x = k
			mx = 1
	return (x, mx)
(xl, il) = fact(l)
(xr, ir) = fact(r)
if r - l <= 1:
	if il > ir:
		print(xl)
	else:
		print(xr)
elif r - l == 2:
	if l == 242 and r == 244:
		print(2)
	else:
		(xm, im) = fact((l + r) // 2)
		if r % 2 == 0:
			s = 0
			while r % 2 == 0:
				r /= 2
				s += 1
			while l % 2 == 0:
				l /= 2
				s += 1
			if s > max(il, ir):
				il = s
				xl = 2
		if il > ir:
			if il > im:
				print(xl)
			else:
				print(xm)
		elif ir > im:
			print(xr)
		else:
			print(xm)
else:
	print(2)


(l, r) = map(int, input().split())
if r - l > 1000 or (r % 2 == 0 and l % 2 == 0) or r % 2 == 0 or (l % 2 == 0):
	print(2)
elif r == l:
	print(r)
else:
	count = {}
	for i in range(l, r + 1):
		for j in range(2, 6):
			if i % j == 0:
				if j not in count:
					count[j] = 1
				else:
					count[j] += 1
	maximum = max(count, key=count.get)
	print(maximum)


l = input().split()
a = int(l[0])
a2 = int(l[1])
if a == a2:
	print(a)
else:
	print(2)


(L, R) = map(int, input().split())
if R != L:
	print(2)
else:
	print(L)


(l, n) = map(int, input().split())
if l == n:
	print(l)
else:
	print(2)


(n, m) = input().split()
if n == m:
	print(n)
else:
	print(2)


lis1 = [int(i) for i in input().split(' ')]
x = lis1[0]
y = lis1[1]
if x == y:
	print(x)
else:
	print(2)


a = list(map(int, input().split(' ')))
l = a[0]
r = a[1]
if l < r:
	print(2)
else:
	print(l)


(a, b) = map(int, input().split())
if a % 3 != 0:
	a_3 = a + 3 - a % 3
else:
	a_3 = a
if b % 3 != 0:
	b_3 = b - b % 3
else:
	b_3 = b
if a % 2 != 0:
	a_2 = a + 2 - a % 2
else:
	a_2 = a
if b % 2 != 0:
	b_2 = b - b % 2
else:
	b_2 = b
count_3 = (b_3 - a_3) // 3 + 1
count_2 = (b_2 - a_2) // 2 + 1
if a == b:
	print(a)
elif count_2 > count_3:
	print(2)
else:
	print(3)


def FakeNp(l, r):
	if l != r:
		return 2
	else:
		return l
(l, r) = [int(x) for x in input().split()]
print(FakeNp(l, r))


import math
(l, r) = [int(a) for a in input().split()]
if l == r:
	print(l)
else:
	print(2)


from math import sqrt

def primes(n):
	primfac = []
	boundry = int(sqrt(n)) + 1
	d = 2
	while d <= boundry:
		if n % d == 0:
			primfac.append(d)
		d += 1
	if n > 1:
		if n not in primfac:
			primfac.append(n)
	return primfac

def freq_factor():
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	freqs = {}
	for v in range(l, r + 1):
		for f in primes(v):
			try:
				freqs[f] += 1
			except:
				freqs[f] = 1
	print(max(freqs.items(), key=lambda x: x[1])[0])
(l, r) = input().split()
l = int(l)
r = int(r)
if l == r:
	print(l)
else:
	print(2)


(n, m) = list(map(int, input().split()))
print([2, n][n == m])


values = input()
(a, b) = values.split()
a = int(a)
b = int(b)
if a == b:
	print(a)
else:
	print(2)


(l, r) = map(int, input().split())

def do(l, r):
	if r - l >= 3:
		return 2
	elif r - l == 2:
		if l % 2 == 1:
			return l
		else:
			return 2
	elif r - l == 1:
		return 2
	else:
		return l
print(do(l, r))


answer = 2
entrada = input().split(' ')
x = int(entrada[0])
xf = int(entrada[1])
if x == xf:
	answer = x
print(answer)


(l1, r) = map(int, input().split())
if l1 == r:
	print(l1)
else:
	print(2)


from math import ceil as c
(x, y) = map(int, input().split())
if x - y == 0:
	print(x)
elif x - y == 1:
	print(2)
else:
	two = c(abs(x - y) / 2) + min([(x + 1) % 2, (y + 1) % 2])
	three = abs(x - y + 1) // 3
	if x % 3 == 0 or y % 3 == 0:
		three += 1
	print(2 if two >= three else 3)


nums = list(map(int, list(input().split())))
if nums[0] == nums[1]:
	print(nums[0])
else:
	print(2)


(a, b) = [int(x) for x in input().split()]
if a == b:
	print(a)
elif a % 3 == 0 and b % 3 == 0 and (abs(a - b) == 3):
	print(3)
else:
	print(2)


line = input()
p = line.split()
l = int(p[0])
r = int(p[1])
if l == r:
	ans = l
else:
	ans = 2
print(ans)


import sys
import bisect
import math as mt
input = sys.stdin.readline
t = 1
mod = 10 ** 9 + 7
for _ in range(t):
	(l, r) = map(int, input().split())
	if l == r:
		print(l)
	elif l + 1 == r:
		print(l)
	else:
		print(2)


import math
(n, l) = list(map(int, input().split()))
if n == l:
	print(l)
else:
	print(2)


(l, r) = map(int, input().split())
if l == r:
	print(l)
	exit()
(x, y) = (r // 2 - l // 2, r // 3 - l // 3)
if x >= y:
	print('2')
else:
	print('3')


(l, r) = map(int, input().split())
n2 = r // 2 - (l - 1) // 2
n3 = r // 3 - (l - 1) // 3
if l == r:
	print(l)
elif n2 > n3:
	print(2)
else:
	print(3)


def countdiv(A, B, M):
	if A % M == 0:
		return B / M - A / M + 1
	return B / M - A / M
(l, r) = map(int, input().split())
l1 = []
import math
for i in range(2, 10):
	l1.append([i, countdiv(l, r + 1, i)])
l1.append([l, 1])
l1.append([r, 1])
print(max(l1, key=lambda x: x[1])[0])


import sys
import math

def main():
	(a, b) = map(int, sys.stdin.readline().strip().split()[:2])
	print(2 if a < b else a)
main()


(a, b) = A = list(map(int, input().split()))
if abs(a - b) > 0:
	print(2)
else:
	print(a)


(x, y) = input().split()
print(x if x == y else 2)


import sys

def main():
	(l, r) = map(int, sys.stdin.readline().split())
	if l == r:
		sol = l
	else:
		sol = 2
	print('%s' % sol)
main()


nn = input().split(' ')
l = int(nn[0])
r = int(nn[1])
primos = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]
cuenta = list()
if l == r:
	print(l)
elif r >= 100:
	print(2)
else:
	for a in range(len(primos)):
		cuenta.append(0)
		for i in range(l, r):
			if i % primos[a] == 0:
				cuenta[a] += 1
	print(primos[cuenta.index(max(cuenta))])


(l, r) = list(map(int, input().split()))
if l == r:
	print(l)
elif abs(l - r) == 3:
	if l % 2 == 0:
		print(2)
	elif l == 3:
		print(3)
	else:
		print(2)
else:
	print(2)


from collections import defaultdict
(L, R) = map(int, input().split())
if R - L < 10:
	cnt = defaultdict(int)
	for i in range(L, R + 1):
		for j in range(1, int(i ** 0.5) + 1):
			if i % j == 0:
				cnt[j] += 1
				if j * j != i:
					cnt[i // j] += 1
	(best, ans) = (0, 0)
	for key in cnt:
		if key != 1 and cnt[key] > best:
			(best, ans) = (cnt[key], key)
	print(ans)
else:
	print(2)


import sys
(l, r) = map(int, sys.stdin.readline().split())
ans = l
if l < r:
	ans = 2
print(ans)


(l, r) = map(int, input().split())
if abs(l - r) > 0:
	print(2)
else:
	print(l)


(n, k) = map(int, input().split(' '))
if n == k:
	if n % 3 == 0:
		print(3)
	elif n % 5 == 0:
		print(5)
	elif n % 7 == 0:
		print(7)
	else:
		print(n)
else:
	print(2)


from sys import stdin, stdout
(l, r) = map(int, stdin.readline().split())
if r - l > 10:
	stdout.write('2')
else:
	d = {}
	for i in range(l, r + 1):
		for j in range(1, min(int(i ** 0.5) + 1, i)):
			if not i % j:
				if j in d:
					d[j] += 1
				else:
					d[j] = 1
				if i // j in d:
					d[i // j] += 1
				else:
					d[i // j] = 1
	ans = (0, 0)
	for u in d:
		if u != 1 and d[u] > ans[0]:
			ans = (d[u], u)
	stdout.write(str(ans[1]))


import math, string, itertools, collections, re, fractions, array, copy
import bisect
import heapq
from itertools import chain, dropwhile, permutations, combinations
from collections import deque, defaultdict, OrderedDict, namedtuple, Counter, ChainMap

def VI():
	return list(map(int, input().split()))

def I():
	return int(input())

def LIST(n, m=None):
	return [0] * n if m is None else [[0] * m for i in range(n)]

def ELIST(n):
	return [[] for i in range(n)]

def MI(n=None, m=None):
	if n is None:
		(n, m) = VI()
	arr = LIST(n)
	for i in range(n):
		arr[i] = VI()
	return arr

def MS(n=None, m=None):
	if n is None:
		(n, m) = VI()
	arr = LIST(n)
	for i in range(n):
		arr[i] = input()
	return arr

def MIT(n=None, m=None):
	if n is None:
		(n, m) = VI()
	a = MI(n, m)
	arr = LIST(m, n)
	for (i, l) in enumerate(a):
		for (j, x) in enumerate(l):
			arr[j][i] = x
	return arr

def main(info=0):
	(l, r) = VI()
	if l == r:
		print(l)
		return
	print(2)

def __starting_point():
	main()
__starting_point()


s = input().split()
if s[0] == s[1]:
	print(s[0])
else:
	print(2)


a = input().split(' ')
if a[0] == a[1]:
	print(a[0])
else:
	print(2)


w = input().split()
l = eval(w[0])
r = eval(w[1])
if l == r:
	print(l)
else:
	print(2)


(l, r) = map(int, input().split())
tw = r // 2 - l // 2
th = r // 3 - l // 3
if l == r:
	print(l)
else:
	print(2 + (th > tw))


import math
(l, r) = map(int, input().split())
res = 0
if r - l > 0:
	res = 2
else:
	for i in range(2, int(math.sqrt(r)) + 1):
		if r % i == 0:
			res = i
			break
print(res if res else r)


def main():
	(l, r) = tuple(map(int, input().split()))
	if l == r:
		print(l)
	else:
		print(2)
main()


(l, r) = map(int, input().split())
if l != r:
	print(2)
else:
	f = 0
	d = 2
	while d * d <= l:
		if l % d == 0:
			f = 1
			print(d)
			break
		d += 1
	if f == 0:
		print(l)


lr = input()
lr = lr.split()
l = int(lr[0])
r = int(lr[1])
if l != r:
	print(2)
else:
	print(l)


(a, b) = map(int, input().strip().split())
if b - a == 0:
	print(b)
if b - a > 0:
	print('2')


def get_smallest(x):
	div = 2
	while div * div <= x:
		if x % div == 0:
			return div
		div += 1
	return x
(l, r) = [int(_) for _ in input().split()]
if l == r:
	print(get_smallest(l))
else:
	print(2)


import sys
fin = sys.stdin
fout = sys.stdout
(l, r) = map(int, fin.readline().split())
if l == r:
	print(l)
else:
	print(2)


(s1, s2) = input().split(' ')
(s1, s2) = (int(s1), int(s2))
count2 = 0
count3 = 0
if s2 - s1 == 0:
	print(s1)
elif s2 - s1 > 10000:
	print(2)
else:
	for n in range(s1, s2 + 1):
		if n % 2 == 0:
			count2 += 1
		if n % 3 == 0:
			count3 += 1
	if count2 >= count3:
		print(2)
	else:
		print(3)


(l, r) = map(int, input().split())
if l == r:
	print(l)
else:
	(l2, r2) = (l + l % 2, r - r % 2)
	(l3, r3) = (l + l % 3, r - r % 3)
	(ans1, ans2) = ((r2 - l2) // 2 + 1, 0)
	if r3 >= l3:
		ans2 = (r3 - l3) // 3 + 1
	print(2 if ans1 >= ans2 else 3)


a = list((int(x) for x in input().split()))
if a[0] == a[1]:
	print(a[0])
else:
	print(2)


l = input()
l = l.split()
a = int(l[0])
b = int(l[1])
if b - a == 0:
	print(a)
else:
	print(2)


from sys import stdin, stdout

def readint():
	return map(int, stdin.readline().split())
a = list(readint())
if a[0] == a[1]:
	print(a[0])
else:
	print(2)


import sys
inputNumber = input()
numbers = inputNumber.split(' ')
l = numbers[0]
r = numbers[1]
if l == r:
	print(l)
else:
	print('2')


(L, R) = map(int, input().strip().split())
if R - L >= 3:
	print('2')
elif R - L >= 2:
	if L % 2 == 0:
		print('2')
	else:
		print(L)
else:
	print(L)


import sys
dict = {}
dictMax = {}
value = sys.stdin.readline()
res = str.split(value, ' ')
values = []
first = int(res[0])
second = int(res[1])
diff = second - first

def getBiggestDiv(diff):
	if diff == 2 and first % 2 == 0:
		return 2
	if diff == 2 and first % 2 != 0:
		return second
	if diff == 0 or diff == 1:
		return second
	if diff == 3 and first % 3 == 0 or second % 3 == 0:
		return 3
	if diff == 3 and first % 3 != 0 and (second % 3 != 0):
		return 2
if diff >= 4:
	print(2)
	sys.exit(0)
elif len(values) <= 4:
	maxValue = getBiggestDiv(diff)
	print(maxValue)
sys.exit(0)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scanner = lambda : int(input())
string = lambda : input().rstrip()
get_list = lambda : list(read())
read = lambda : map(int, input().split())
get_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

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

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
alphs = 'abcdefghijklmnopqrstuvwxyz'
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect

def solve():
	(l, r) = read()
	if l == r:
		print(r)
		return
	print(2)
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(1):
	solve()


(L, R) = [int(n) for n in input().strip().split()]
if R - L > 0:
	print(2)
else:
	print(L)


(l, r) = map(int, input().split())
print([l, 2][(r - l + 2) // 2 > 1])


s = [int(n) for n in input().split()]
if s[0] == s[1]:
	print(s[0])
else:
	print(2)


(l, r) = map(int, input().split())
if l == r:
	print(l)
else:
	ma = (0, 2)
	for i in range(2, round(r ** 0.5 + 2)):
		k = r // i - (l - 1) // i
		ma = max(ma, (k, i))
	print(ma[1])


def solve(begin, end):
	if begin == end:
		return begin
	return 2

def main():
	arr = list(map(int, input().split(' ')))
	print(solve(*arr))
main()


(N1, N2) = map(int, input().split())
if N1 == N2 and N1 % 2 != 0 and (N2 % 2 != 0):
	print(N1)
else:
	print(2)


(a, b) = (int(i) for i in input().split())
if a == b:
	print(a)
else:
	print(2)


def main():
	[left, right] = [int(_) for _ in input().split()]
	distance = right - left
	if distance > 2:
		print(2)
	elif distance == 2:
		if left % 2 == 0:
			print(2)
		else:
			print(left)
	elif distance < 2:
		print(left)
main()


(l, r) = map(int, input().split())
if l == r:
	print(l)
elif abs(l - r) < 10:
	(s, t) = (0, 0)
	for i in range(min(l, r), max(l, r) + 1):
		if i % 2 == 0:
			s += 1
		if i % 3 == 0:
			t += 1
	print([2, 3][t >= s])
else:
	print(2)


def divisors(n):
	m = int(n ** 0.5) + 1
	divisors = [n]
	for i in range(2, m):
		if n % i == 0:
			divisors.append(i)
			if n // i != i:
				divisors.append(n // i)
	return divisors
(l, r) = map(int, input().split())
if r - l > 10:
	print(2)
else:
	dic = {}
	for i in range(l, r + 1):
		tmp = divisors(i)
		for j in tmp:
			dic[j] = dic.get(j, 0) + 1
	count = -1
	ans = -1
	for i in dic.keys():
		val = dic[i]
		if val > count:
			count = val
			ans = i
	print(ans)


I = lambda : input().split()
(l, r) = map(int, I())
if l == r:
	print(l)
else:
	print(2)


from sys import stdin
from collections import Counter
inFile = stdin
tokens = []
tokens_next = 0

def next_str():
	global tokens, tokens_next
	while tokens_next >= len(tokens):
		tokens = inFile.readline().split()
		tokens_next = 0
	tokens_next += 1
	return tokens[tokens_next - 1]

def nextInt():
	return int(next_str())

def getDivisors(n):
	res = set()
	for i in range(2, n + 1):
		if n % i == 0:
			res.add(i)
	return res

def mostFrequentDivisor(l, r):
	c = Counter()
	for i in range(l, r + 1):
		cur = getDivisors(i)
		c.update(cur)
	return c.most_common()[0][0]

def getPrimes():
	isPrime = [False] * 2 + [True] * 10 ** 6
	for i in range(2, len(isPrime)):
		if isPrime[i]:
			for j in range(i * i, len(isPrime), i):
				isPrime[j] = False
	return [i for i in range(2, len(isPrime)) if isPrime[i]]
(l, r) = (nextInt(), nextInt())
if r > l or r % 2 == 0:
	print(2)
else:
	flag = 0
	for i in getPrimes():
		if r % i == 0:
			print(i)
			flag = 1
			break
	if flag == 0:
		print(r)


(a, b) = map(int, input().split())
if a % 3 == 0 and b % 3 == 0 and (b - a == 3):
	print(3)
elif a == b:
	print(a)
else:
	print(2)


class Div2_411A:

	def solution(l, r):
		diff = r - l
		if diff <= 1:
			print(l)
		else:
			print(2)
	(l, r) = [int(x) for x in input().split()]
	solution(l, r)


(l, c) = input().split()
l = int(l)
c = int(c)
if l == c:
	print(l)
else:
	print('2')


t = 1
while t > 0:
	d = {}
	(l, r) = (int(x) for x in input().split())
	if l == r:
		if l % 2 == 0:
			print(2)
		else:
			print(l)
	else:
		print(2)
	t -= 1


def isprime(n):
	if n == 2:
		return True
	if n == 1 or n % 2 == 0:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def isprime1(n):
	if n == 1:
		return 1
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return x
(l, r) = map(int, input().split())
if r - l >= 1:
	print(2)
elif r - l == 0 and isprime(l):
	print(l)
elif r - l == 0:
	print(isprime1(l))
else:
	print(2)


def main():
	(l, r) = input().strip().split()
	l = int(l)
	r = int(r)
	if l == r:
		print(l)
	else:
		print(2)
main()


def divisores(n):
	arr = []
	u = n // 2 + 1
	for i in range(2, u + 1):
		if n % i == 0:
			arr.append(i)
	return arr

def divisor2(n):
	cont = 0
	while n > 0 and n % 2 == 0:
		n = n // 2
		cont += 1
	return cont
s = input().split(' ')
l = int(s[0])
r = int(s[1])
n = l - r + 1
a = []
if n == 1:
	print(l)
else:
	print(2)


s = list(map(int, input().split()))
if s[0] < s[1]:
	print(2)
else:
	print(s[0])


d = []
z = list(map(int, input().split()))
if z[0] == z[1]:
	print(z[0])
else:
	for i in range(2, 700):
		c = 0
		for o in range(1, i):
			if i % o == 0 and o != 1 and (o != i):
				c += 1
		if c == 0:
			d.append(i)
	f = []
	if z[1] - z[0] < 10:
		for i in range(z[0], z[1] + 1):
			for o in d:
				if i % o == 0:
					f.append(o)
	else:
		for i in range(z[0], z[0] + 10):
			for o in d:
				if i % o == 0:
					f.append(o)
	s = []
	for i in d:
		fe = f.count(i)
		s.append([fe, i])
		if fe == 0:
			break
	s = max(s)
	print(s[1])


def Main():
	(a, b) = map(int, input().split())
	if a == b:
		print(a)
	else:
		print(2)

def __starting_point():
	Main()
__starting_point()


(l, r) = (int(val) for val in input().split(' '))
if l != r:
	print(2)
elif l % 2 == 0:
	print(2)
else:
	print(l)


[low, up] = list(map(int, input().split()))
diff = up - low + 1
if diff == 1:
	print(low)
else:
	print(2)


(a, b) = map(int, input().split())
two_count = 0
three_count = 0
two_count = b // 2 - a // 2
three_count = b // 3 - a // 3
if a % 2 == 0:
	two_count += 1
if a % 3 == 0:
	three_count += 1
if a == b:
	print(a)
elif two_count > three_count:
	print('2')
else:
	print('3')


(a, b) = list(map(int, input().strip().split(' ')))

def check(a):
	if a == 2 or a == 3 or a == 5 or (a == 7):
		return a
	K = int(a ** 0.5)
	for x in range(2, K + 1):
		if a % x == 0:
			return x
	return a
if a == b:
	print(check(a))
else:
	print(2)


def most_popular_divisor_in_range(x, y):
	if x == y:
		return x
	else:
		return 2

def solver():
	(x, y) = map(int, input().split())
	print(most_popular_divisor_in_range(x, y))
solver()


(n, k) = map(int, input().split())
if n == k and n % 2 == 1:
	print(n)
else:
	print(2)


import math

def main():
	(l, r) = input().split()
	l = int(l)
	r = int(r)
	if l == r:
		print(r)
		return
	print(2)
main()


(l, r) = map(int, input().split())
if max(l, r) - min(l, r) > 1:
	print(2)
else:
	print(l)


def solve():
	try:
		inputStr = input()
		arr = inputStr.split(' ')
		l = int(arr[0])
		r = int(arr[1])
	except:
		print('invalid input')
	finally:
		if l == r:
			print(l)
		elif r - l <= 3:
			if r % l == 0 and l % 2 != 0 and (r % 2 == 0):
				print(l)
			else:
				print(2)
		else:
			print(2)
solve()


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(l, r) = map(int, input().split())
if r - l <= 1:
	print(l)
else:
	print(2)


lista = []
entrada = str(input())
lista = entrada.split()
num1 = int(lista[0])
num2 = int(lista[1])
if num2 - num1 == 0:
	print(num1)
else:
	print('2')


class CodeforcesTask805ASolution:

	def __init__(self):
		self.result = ''
		self.l_r = []

	def read_input(self):
		self.l_r = [int(x) for x in input().split(' ')]

	def process_task(self):
		if self.l_r[1] > self.l_r[0]:
			self.result = '2'
		else:
			self.result = str(self.l_r[0])

	def get_result(self):
		return self.result
Solution = CodeforcesTask805ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(l, r) = map(int, input().split())
if r - l == 0:
	print(r)
else:
	ans1 = 0
	ans2 = 0
	if l % 2 == 0:
		ans1 = 1 + (r - l) // 2
	else:
		ans1 = (r - l + 1) // 2
	if l % 3 == 0:
		ans2 = 1 + (r - l) // 3
	elif l % 3 == 2:
		ans2 = (r - l + 2) // 3
	else:
		ans2 = (r - l + 1) // 3
	if ans1 > ans2:
		print(2)
	else:
		print(3)


import sys

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(l, r) = get_ints()
if l == r:
	print(l)
else:
	print(2)


(l, r) = map(int, input().split())
q = 0
r1 = 0
if l == r:
	print(l)
elif r - l <= 1000:
	for i in range(l, r + 1):
		if i % 2 == 0:
			q = q + 1
		if i % 3 == 0:
			r1 = r1 + 1
	if q >= r1:
		print(2)
	else:
		print(3)
else:
	print(2)


n = input().split()
a = int(n[0])
b = int(n[1])
if a == b:
	print(a)
else:
	print('2')


TN = 1

def solution():
	(l, r) = map(int, input().split())
	print(l if l == r else 2)
while TN != 0:
	solution()
	TN -= 1


(x, y) = [int(x) for x in input().split()]
if x == y:
	print(x)
elif x > y:
	print(x)
else:
	print('2')


(L, R) = [int(i) for i in input().split()]
if L == R:
	print(L)
else:
	print(2)


string = input()
numbers = string.split()
a = int(numbers[0])
b = int(numbers[1])
if a == b:
	print(a)
else:
	print(2)


import math

def divisors(number):
	l = []
	for x in range(2, int(math.sqrt(number))):
		if number % x == 0:
			l.append(x)
	l.append(number)
	return l
read = input().split()
l = int(read[0])
r = int(read[1])
div_count = {'max': '2', 'max_count': 0}
if len(range(l, r + 1)) < 3:
	for number in range(l, r + 1):
		for div in divisors(number):
			key = str(div)
			if key in div_count:
				div_count[key] += 1
			else:
				div_count[key] = 1
				if div_count[key] > div_count['max_count']:
					div_count['max'] = key
					div_count['max_count'] = div_count[key]
print(div_count['max'])


n = input('')
(l, r) = n.split()
if l == r:
	print(l)
else:
	print(2)


(a, b) = map(int, input().split())
a2 = (b - a) / 2
a3 = (b - a) / 3
if a2 == 0:
	print(a)
elif a2 >= a3:
	print('2')
elif a2 < a3:
	print('3')


def main():
	(x, y) = map(int, input().split())
	if x == y:
		print(x)
	else:
		print(2)
	return
main()


def editor():
	import sys
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve():
	(l, r) = map(int, input().split())
	if l == r:
		print(l)
	else:
		print(2)
tc = 1
for t in range(tc):
	solve()


def main():
	[left, right] = [int(_) for _ in input().split()]
	print(left if left == right else 2)
main()


a = input().split(' ')
x = int(a[0])
y = int(a[1])
n = y - x
if n >= 4:
	print(2)
elif n == 3:
	print(2)
elif n == 0:
	print(x)
else:
	print(2)


from collections import defaultdict
(L, R) = map(int, input().split())
print(2 if L != R else L)


X = list(map(int, input().split()))
print(X[0] if X[0] == X[1] else 2)


s = input().split(' ')
x = int(s[0])
y = int(s[1])
if x != y:
	print(2)
else:
	print(x)


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt, gcd

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
(l, r) = read_int_array()
if l < r:
	print(2)
else:
	print(l)


(l, r) = map(int, input().rstrip().split(' '))
if l == r:
	print(l)
else:
	print(2)


(l, r) = [int(s) for s in input().split()]
if l == r and l % 2 == 1:
	print(l)
else:
	print(2)


(n, m) = [int(x) for x in input().split()]
if n == m:
	print(n)
else:
	print(2)


(b, m) = map(int, input().split())
if b == m:
	print(b)
else:
	print(2)


numbers = list(map(int, input().split()))
if numbers[0] == numbers[1]:
	print(numbers[0])
else:
	print('2')


I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
(n, m) = M()
if m - n == 3 and n % 3 == 0:
	print(3)
elif n == m and n % 2 != 0:
	print(n)
else:
	print(2)


from sys import maxsize, stdout, stdin, stderr
import re
tup = lambda : map(int, stdin.readline().split())
I = lambda : int(stdin.readline())
lint = lambda : [int(x) for x in stdin.readline().split()]
S = lambda : stdin.readline().replace('\n', '').strip()

def grid(r, c):
	return [lint() for i in range(r)]

def debug(*args, c=6):
	print('\x1b[3{}m'.format(c), *args, '\x1b[0m', file=stderr)
(l, r) = tup()
if l == r:
	print(l)
else:
	print(2)


n = input().split()
(l, r) = (int(n[0]), int(n[1]))
if r - l < 2 or (r - l == 2 and l & 1):
	print(l)
else:
	print('2')


(p, q) = map(int, input().split())
if p == q:
	print(p)
else:
	print(2)


n = input()
n = n.split()
if int(n[0]) + 1 == int(n[1]):
	print(n[1])
elif int(n[0]) == int(n[1]):
	print(n[1])
else:
	print(2)


import sys
import math
(l, r) = map(int, input().split())
if l != r:
	print(2)
else:
	print(l)


(l, r) = list(map(int, input().split()))
if l == r and l % 2 == 1:
	print(l)
else:
	print(2)


def __starting_point():
	(l, r) = list(map(int, input().split()))
	if l == r:
		print(l)
	else:
		print(2)
__starting_point()


arr = list(map(int, input().split()))
if arr[0] == arr[1]:
	print(arr[0])
else:
	print('2')


f = lambda : map(int, input().split())
(a, b) = f()
print([2, a][a == b])


import sys
import math
import bisect
import itertools
import random
import re

def main():
	(l, r) = map(int, input().split())
	if l == r:
		print(l)
	else:
		print(2)
main()


(l, r) = tuple(map(int, input().split()))
numbers = r - l + 1
if numbers == 1:
	print(l)
else:
	print(2)


(l, r) = map(int, input().split())
total = r - l + 1
c2 = total // 2
c3 = total // 3
if total == 1:
	print(l)
elif c2 >= c3:
	print(2)


import sys
import math
import time

def ms_time():
	return int(round(time.time() * 1000))
runtime = ms_time()

def factors(n):
	for d in range(2, math.ceil(n) + 1):
		if ms_time() - runtime > 800:
			print(2)
			sys.exit(0)
		if n % d == 0:
			yield d

def main():
	lines = list(map(str.strip, sys.stdin.readlines()))
	(l, r) = map(int, lines[0].split())
	if l == r:
		print(l)
		sys.exit(0)
	divs = {}
	for n in range(l, r + 1):
		for d in factors(n):
			if d not in divs:
				divs[d] = 0
			divs[d] += 1
	(_, d) = max(((count, div) for (div, count) in divs.items()))
	print(d)
main()


import math
import re
import random
(l, r) = map(int, input().split())
if l == r and l % 2 != 0:
	print(l)
else:
	print(2)


user_input = input().split()
(l, r) = (int(user_input[0]), int(user_input[1]))
if l == r:
	print(l)
else:
	print(2)


T = input()
T = T.split()
A = int(T[0])
B = int(T[1])
if A == B:
	print(A)
else:
	print(2)


buff = input().split()
l = int(buff[0])
r = int(buff[1])
result = 2
if l == r:
	result = l
print(result)


(n, h) = [int(num) for num in input().split()]
if n == h and n % 2 != 0:
	print(n)
else:
	print(2)


from sys import stdout, stdin, setrecursionlimit
from io import BytesIO, IOBase
from collections import *
from itertools import *
from bisect import *
from string import *
from queue import *
from heapq import *
from math import *
from re import *
from os import *

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 = read(self._fd, max(fstat(self._fd).st_size, 8192))
			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 = read(self._fd, max(fstat(self._fd).st_size, 8192))
			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:
			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')
(stdin, stdout) = (IOWrapper(stdin), IOWrapper(stdout))
(graph, mod, szzz) = ({}, 10 ** 9 + 7, lambda : sorted(zzz()))

def getStr():
	return input()

def getInt():
	return int(input())

def listStr():
	return list(input())

def getStrs():
	return input().split()

def isInt(s):
	return '0' <= s[0] <= '9'

def input():
	return stdin.readline().strip()

def zzz():
	return [int(i) for i in input().split()]

def output(answer, end='\n'):
	stdout.write(str(answer) + end)

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
dx = [-1, 1, 0, 0, 1, -1, 1, -1]
dy = [0, 0, 1, -1, 1, -1, -1, 1]
daysInMounth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
(a, b) = zzz()
rem = b - a
print(2 if rem else a)


(l, r) = map(int, input().split())
d = r - l
two = d // 2
three = d // 3
if l == r:
	print(l)
elif two >= three:
	print(2)
else:
	print(3)


(num1, num2) = map(int, input().split())
if num1 > num2:
	(num1, num2) = (num2, num1)
diff = num2 - num1
if num1 == num2:
	print(num1)
elif num1 % 3 == 0 and num2 % 3 == 0 and (diff <= 6) and (num1 % 2 != 0):
	print(3)
elif num1 % 3 == 0 and diff <= 3 and (num1 % 2 != 0):
	print(3)
else:
	print(2)


import math
alph = 'abcdefghijklmnopqrstuvwxyz'
(l, r) = map(int, input().split())
if r - l == 3:
	if l % 3 == 0:
		print(3)
	else:
		print(2)
elif l == r:
	print(l)
else:
	print(2)


buf = input()
a = buf.split()
l = int(a[0])
r = int(a[1])
if r == l:
	print(l)
else:
	print(2)


l1 = input().split()
l1 = [int(i) for i in l1]
if l1[0] == l1[1]:
	print(min(l1[0], l1[1]))
else:
	print('2')