You are given a set of all integers from $l$ to $r$ inclusive, $l < r$, $(r - l + 1) \le 3 \cdot 10^5$ and $(r - l)$ is always odd.

You want to split these numbers into exactly $\frac{r - l + 1}{2}$ pairs in such a way that for each pair $(i, j)$ the greatest common divisor of $i$ and $j$ is equal to $1$. Each number should appear in exactly one of the pairs.

Print the resulting pairs or output that no solution exists. If there are multiple solutions, print any of them.


-----Input-----

The only line contains two integers $l$ and $r$ ($1 \le l < r \le 10^{18}$, $r - l + 1 \le 3 \cdot 10^5$, $(r - l)$ is odd).


-----Output-----

If any solution exists, print "YES" in the first line. Each of the next $\frac{r - l + 1}{2}$ lines should contain some pair of integers. GCD of numbers in each pair should be equal to $1$. All $(r - l + 1)$ numbers should be pairwise distinct and should have values from $l$ to $r$ inclusive.

If there are multiple solutions, print any of them.

If there exists no solution, print "NO".


-----Example-----
Input
1 8

Output
YES
2 7
4 1
3 8
6 5

Source: codeforces | Difficulty: EASY
Tags: Number theory

Mathematics

Greedy algorithms


Solutions:
def gcd(A, B):
	if B == 0:
		return A
	remainder = A % B
	return gcd(B, remainder)

def verify_input(input):
	if input[0] < input[1]:
		if input[0] > 0 and input[1] <= 10 ** 18:
			if input[1] - input[0] + 1 <= 3 * 10 ** 5:
				if (input[1] - input[0]) % 2 == 1:
					return True
	return False

def solution(S):
	for i in range(0, len(S), 2):
		print(S[i], S[i + 1])
S = [int(x) for x in input().split()]
verified = verify_input(S)
if verified:
	print('YES')
	solution(list(range(S[0], S[1] + 1)))
else:
	print('NO')


(l, r) = map(int, input().split())
print('YES')
i = l
while i < r:
	print(i, i + 1)
	i += 2


(n, m) = map(int, input().split())
k = (m - n + 1) // 2
if k > 0:
	print('YES')
	for i in range(n, m, 2):
		print(i, i + 1)
else:
	print('NO')


(l, r) = map(int, input().split())
if l % 2 == r % 2:
	print('NO')
else:
	print('YES')
	for i in range(l, r + 1, 2):
		print(i, ' ', i + 1)


(m, n) = map(int, input().split())
print('YES')
for i in range(m, n, 2):
	print(i, i + 1)


(l, r) = list(map(int, input().split()))
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


from sys import stdin, stdout
import cProfile, math
from collections import Counter
printHeap = str()
test = False
memory_constrained = False

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def test_print(output):
	if test:
		stdout.write(str(output) + '\n')

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result

def main():
	(l, r) = get_tuple()
	stdout.write('YES')
	k = l + 1
	for i in range((r - l + 1) // 2):
		stdout.write('\n' + str(l) + ' ' + str(k))
		l += 2
		k += 2
cProfile.run('main()') if test else main()


import sys

class MyReader:

	def __init__(self):
		filename = 'file.in'
		if self.isLocal():
			self.file = open(filename)
		self.str = ['']
		self.ind = 1

	def isLocal(self):
		return len(sys.argv) > 1 and sys.argv[1] == 'SCHULLZ'

	def nextString(self):
		if self.isLocal():
			return self.file.read()
		else:
			return input()

	def nextInt(self):
		return int(self.nextToken())

	def nextToken(self):
		if self.ind >= len(self.str):
			self.ind = 0
			self.str = self.nextString().split()
		self.ind += 1
		return self.str[self.ind - 1]

def Solve():
	lt = -1
	try:
		lt = rdr.nextInt()
	except Exception:
		return False
	rt = rdr.nextInt()
	print('YES')
	for i in range(0, (rt - lt + 1) // 2):
		print(lt + i * 2, lt + i * 2 + 1)
	return True
rdr = MyReader()
if not rdr.isLocal():
	Solve()
else:
	while Solve():
		fgh = 1


def ip():
	return int(input())

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

def sar():
	return list(ipp())

def pars(a):
	print(' '.join(list(map(str, a))))
	print('\r')

def parl(a):
	print('\r'.join(list(map(str, a))))
	print('\r')
T = 1
for _ in range(T):
	(l, r) = ipp()
	if l == r:
		print('NO')
	else:
		print('YES')
		for i in range(l, r + 1, 2):
			print(i, i + 1)


(l, r) = map(int, input().split())
(x, y) = ([], [])
for i in range(l, r + 1):
	if i % 2 == 0:
		x.append(i)
	else:
		y.append(i)
if (l - r) % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(len(x)):
		print(x[i], y[i])


(a, b) = [int(i) for i in input().split()]
print('YES')
for i in range(a, b, 2):
	print(i, i + 1)


(l, m) = map(int, input().split())
print('YES', *range(l, m + 1))


(l, r) = map(int, input().split())
j = l
c = []
while j <= r - 1:
	c.append([j, j + 1])
	j += 2
print('YES')
for j in c:
	print(*j)


(a, s) = map(int, input().split())
n = a
print('YES')
for i in range((s - a + 1) // 2):
	print(n, n + 1)
	n += 2


(x, y) = map(int, input().split())
print('YES')
while x < y:
	print(x, x + 1)
	x += 2


(l1, r1) = map(int, input().split())
print('YES')
for p in range(l1, r1 + 1, 2):
	print(p, p + 1)


(l, r) = [int(i) for i in input().split()]
num = (r - l + 1) // 2
t = 0
print('YES')
while t < num:
	print(l + t * 2, l + t * 2 + 1)
	t += 1


(x, y) = list(map(int, input().strip().split()))
print('YES')
while x < y:
	print(str(x) + ' ' + str(x + 1))
	x += 2


from __future__ import division, print_function
import os
import 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
else:
	_str = str
	str = lambda x=b'': x if type(x) is bytes else _str(x).encode()

def main():
	(l, r) = map(int, input().split())
	print('YES')
	for i in range(l, r + 1, 2):
		print(i, i + 1)
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):
		if self.buffer.tell():
			return self.buffer.read()
		return os.read(self._fd, os.fstat(self._fd).st_size)

	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))

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', b' '), 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', b'\n'))
	if kwargs.pop('flush', False):
		file.flush()
(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
input = lambda : sys.stdin.readline().rstrip(b'\r\n')
main()


(l, r) = map(int, input().split())
if (r - l) % 2 == 0:
	print('NO')
else:
	print('YES')
	A = list()
	for i in range(l, r + 1, 1):
		A.append(int(i))
	for i in range(0, len(A), 2):
		print(A[i], A[i + 1], '\n')


(l, r) = map(int, input().split())
print('YES')
a = l
while a != r + 1:
	print(a, a + 1)
	a += 2


(l, r) = map(int, input().split())
a = []
for i in range((r - l + 1) // 2):
	a.append((l + i * 2, l + i * 2 + 1))
if len(a) > 0:
	print('YES')
	for i in a:
		print(*i, sep=' ', end='\n')
else:
	print('NO')


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
(l, r) = ei()
print('YES')
for i in range(int((r - l) / 2 + 1)):
	print(l + i * 2, l + i * 2 + 1)


(n, m) = map(int, input().split())
print('YES')
ch = 1
for i in range(n, m):
	if ch == 0:
		ch = 1
	else:
		print(i, i + 1)
		ch = 0


def f(ll):
	(l, r) = ll
	rl = ['YES']
	for i in range(l, r + 1, 2):
		rl.append('%d %d' % (i, i + 1))
	return rl
l = list(map(int, input().split()))
[print(r) for r in f(l)]


input = input().split(' ')
(input1, input2) = (int(input[0]), int(input[1]))
print('YES')
for i in range(input1, input2, 2):
	print(str(i) + ' ' + str(i + 1))


(l, r) = map(int, input().split())
print('YES')
for x in range(l, r, 2):
	print(x, x + 1)


arr = [int(x) for x in input().split()]
l = arr[0]
r = arr[1]
print('YES')
while l < r:
	print('{} {}'.format(l, l + 1))
	l += 2


(a, b) = map(int, input().split())
pairs = (b - a + 1) // 2
print('YES')
print('\n'.join(('{} {}'.format(a + 2 * x, a + 2 * x + 1) for x in range(pairs))))


(l, r) = map(int, input().split())
i = l
odd = r - l
if odd % 2 == 1:
	print('YES')
	while i <= r:
		print(i, i + 1)
		i += 2
else:
	print('NO')


(l, r) = [int(x) for x in input().split()]
k = 0
t = l
print('YES')
while k < (r - l + 1) // 2:
	print(t, t + 1)
	t += 2
	k += 1


import sys
(a, b) = list(map(int, sys.stdin.readline().strip().split()))
print('YES')
for i in range(a, b + 1, 2):
	print(i, i + 1)


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())

def main():
	(l, r) = map(int, input().split())
	print('YES')
	for i in range(l, r + 1, 2):
		print(i, i + 1)
main()


def function():
	line = str(input()).split()
	first = int(line[0])
	second = int(line[1])
	if second - first < 1:
		print('NO')
		return
	else:
		print('YES')
		for i in range(first, second + 1, 2):
			print(i, i + 1)
function()


import itertools
import math

def main():
	(l, r) = [int(v) for v in input().split()]
	print('YES')
	q = l
	while q < r:
		print(q, q + 1)
		q += 2
main()


def main():
	(l, r) = map(int, input().split())
	print('YES')
	for i in range((r - l + 1) // 2):
		print(2 * i + l, 2 * i + l + 1)
main()


from fractions import gcd
(l, r) = map(int, input().split())
n = 0
m = 0
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)
	n += 1
	if n == (r - l + 1) / 2:
		break


arr = input().split()
lines = []
k = int(arr[0])
while k <= int(arr[1]):
	line = str(k) + ' ' + str(k + 1)
	k += 2
	lines.append(line)
print('YES')
for l in lines:
	print(l)


from math import gcd
(l, r) = map(int, input().split(' '))
ans = []
sum_ = (r - l + 1) // 2
area = [0] * (r - l + 1)
ll = l - 1
while sum_ != 0:
	ll += 1
	if ll == r + 1:
		break
	if area[ll - l] == 1:
		continue
	for i in range(ll - l + 1, len(area)):
		rr = l + i
		if area[i] == 1:
			continue
		if gcd(ll, rr) == 1:
			ans.append((ll, rr))
			area[rr - l] = 1
			area[ll - l] = 1
			sum_ -= 1
			break
	area[ll - l] = 1
if sum_ == 0:
	print('YES')
	for t in ans:
		print(t[0], t[1])
else:
	print('NO')


(l, r) = map(int, input().split())
if (r - l) % 2 == 0:
	print('NO')
	exit()
print('YES')
for i in range(l, r, 2):
	print(i, i + 1, sep=' ')


import sys
from array import array

def readline() -> str:
	return sys.stdin.buffer.readline().decode('utf-8')
(l, r) = map(int, readline().split())
ans = 'YES\n' + '\n'.join((f'{i} {i + 1}' for i in range(l, r, 2)))
sys.stdout.buffer.write(ans.encode('utf-8'))


para = list(map(int, input().split()))
n = para[0]
m = para[1]
print('YES')
for i in range(n, m + 1, 2):
	print(i, i + 1)


line = input()
nums = [int(s) for s in line.split()]
l = nums[0]
r = nums[1]
print('YES')
for i in range(l, r, 2):
	print(i, i + 1)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

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

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

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

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

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True

def main():
	(l, r) = mi()
	rnge = (r - l + 1) // 2
	i = l
	if l < r:
		print('YES')
		while rnge > 0:
			print(i, i + 1)
			i += 2
			rnge -= 1
	else:
		print('NO')
main()


(l, r) = map(int, input().split())
print('YES')
i = l
for k in range((r - l + 1) // 2):
	print('{} {}'.format(i, i + 1))
	i += 2


(x, y) = map(int, input().split())
print('YES\n', '\n'.join(('{} {}'.format(str(i), str(i + 1)) for i in range(x, y + 1, 2))), sep='')


from math import gcd
(l, r) = map(int, input().split())
a = [i for i in range(l, r + 1)]
left = 0
right = r - l
if gcd(l, l + 1) != 1:
	print('NO')
else:
	print('YES')
	for i in range(0, r - l - 1, 2):
		print(a[i], a[i + 1])
	print(a[r - l - 1], a[r - l])


(l, r) = map(int, input().split())
number_of_pairs = (r - l + 1) // 2
print('YES')
for (a, b) in zip(range(l, r, 2), range(l + 1, r + 1, 2)):
	print(a, b)


import math
R = input
(l, r) = map(int, R().split())
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


(n, m) = map(int, input().split())
i = n
print('YES')
while i <= m - 1:
	print(i, i + 1)
	i += 2


(l, r) = [int(x) for x in input().split()]
print('YES')
for i in range(l, r, 2):
	print(f'{i} {i + 1}')


(l, r) = input().split(' ')
l = int(l)
r = int(r)
print('YES')
skip_one = False
for i in range(l, r):
	if skip_one:
		skip_one = False
		continue
	else:
		print(str(i) + ' ' + str(i + 1))
		skip_one = True


(a, b) = map(int, input().split())
x = b - a + 1
if x % 2 == 0 and x:
	print('YES')
	for i in range(a, b, 2):
		print(i, end=' ')
		print(i + 1, end=' ')
		print()
else:
	print('NO')


(a, b) = list(map(int, input().split(' ')))
print('YES')
i = a
while i < b:
	print(i, i + 1)
	i += 2


(x, y) = [int(i) for i in input().split()]
print('YES', end=' ')
for i in range(x, y + 1):
	print(i, end=' ')


(l, r) = map(int, input().split())
m = []
if (abs(r - l) + 1) / 2 == int((abs(r - l) + 1) / 2):
	new_r = l + 1
	LL = int((abs(r - l) + 1) / 2)
	for i in range(LL):
		while new_r % l != 0 or l == 1:
			a = [l, new_r]
			m.append(a)
			new_r += 2
			l += 2
			if len(m) == LL:
				break
		if len(m) == LL:
			break
		l += 2
	print('YES')
	for i in range(LL):
		print(*m[i])
else:
	print('NO')


def main():
	(left, right) = map(int, input().split())
	print('YES')
	for i in range(left, right + 1, 2):
		print(i, i + 1)
main()


strin = input().split()
l = int(strin[0])
r = int(strin[1])
print('YES')
for i in list(range(l, r + 1, 2)):
	print(i, i + 1)


import math
import bisect
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))

def mex(arr):
	nList = set(arr)
	mex = 0
	while mex in nList:
		mex += 1
	return mex

def results(l, r):
	for i in range(l, r, 2):
		print(i, i + 1)

def main():
	lr = seq()
	(l, r) = (lr[0], lr[1])
	print('YES')
	results(l, r)
main()


y = input()
a = []
a1 = list(map(int, y.strip().split()))
for i in range(a1[0], a1[1] + 1):
	a.append(i)
a.sort()
print('YES')
for i in range(a[0], a[len(a) - 1], 2):
	print(i, i + 1)


(l, r) = [int(i) for i in input().split()]
print('YES')
while l < r:
	print(str(l) + ' ' + str(l + 1))
	l += 2


(L, R) = input().split()
l = int(L)
r = int(R)
print('YES')
for j in range(l, r + 1, 2):
	print(j, j + 1)


import math

def mi():
	return list(map(int, input().split(' ')))
(l, r) = mi()
print('YES')
for i in range(l, r, 2):
	print(i, i + 1)


import math

def get_all(a, n):
	for i in range(n):
		print(str(a) + ' ' + str(a + 1))
		a = a + 2
(l, r) = map(int, input().split())
results_no = int((r - l + 1) / 2)
if results_no > 0:
	print('YES')
	get_all(l, results_no)
else:
	print('NO')


(l, r) = map(int, input().split())
c = (r - l + 1) // 2
print('YES')
for i in range(0, c):
	print(l + 2 * i, l + 2 * i + 1)


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

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

def map_string():
	return input().split()
(l, r) = map_input()
print('YES')
for i in range(l, r, 2):
	print(i, i + 1)


import math
(l, r) = map(int, input().rstrip().split())
c = 0
for j in range(l, r + 1, 2):
	c += 1
	if c == 1:
		print('YES')
	print(j, end=' ')
	print(j + 1)


(l, r) = map(int, input().split())
j = l
print('YES')
while j <= r:
	print(j, j + 1)
	j += 2


a = [int(u) for u in input().split()]
print('YES')
for i in range(a[0], a[1] + 1, 2):
	print(i, i + 1)


from math import gcd as g
(l, r) = map(int, input().split())
lis = list(range(l, r + 1))
ans = []
for i in range(r - l + 1):
	if lis[i]:
		for j in range(i + 1, r - l + 1):
			if lis[i] and g(lis[i], lis[j]) == 1:
				ans.append((lis[i], lis[j]))
				lis[i] = 0
				lis[j] = 0
				break
if ans:
	print('YES')
	for i in ans:
		print(*i)
else:
	print('NO')


from sys import stdin
(l, r) = map(int, stdin.readline().split())
print('YES')
for i in range(l, r, 2):
	print(i, i + 1)


def main():
	(lo, hi) = map(int, input().split())
	print('YES')
	print('\n'.join((f'{i} {i + 1}' for i in range(lo, hi + 1, 2))))
main()


(l, r) = map(int, input().split())
a = list(range(l, r + 1))
print('YES')
i = 0
while i < r - l + 1:
	print(a[i], a[i + 1])
	i = i + 2


import math as ma
import sys
from decimal import Decimal as dec
from itertools import permutations

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

def modInverse(a, m):
	m0 = m
	y = 0
	x = 1
	if m == 1:
		return 0
	while a > 1:
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if x < 0:
		x = x + m0
	return x

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

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
(l, r) = num()
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


import sys

def main():
	(l, r) = tuple(map(int, sys.stdin.readline().strip().split(' ')))
	print('YES')
	print('\n'.join(['{0} {1}'.format(x, x + 1) for x in range(l, r, 2)]))
main()


(l, r) = map(int, input().split())
xx = (r - l + 1) // 2
c = 0
ans = []
for i in range(l, r + 1, 2):
	ans.append([i, i + 1])
	c += 1
	if c == xx:
		break
if len(ans) == xx:
	print('YES')
	for i in range(len(ans)):
		print(ans[i][0], ans[i][1])
else:
	print('NO')


from math import sqrt, pow, ceil
from decimal import *
l1 = input().split()
l1 = [int(i) for i in l1]
x = l1[0]
y = l1[1]
print('YES')
while x < y:
	print(str(x) + ' ' + str(x + 1))
	x += 2


import os, sys
from io import BytesIO, IOBase

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

def si():
	return input()

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

def li():
	return list(mi())
l = ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'O', 'I', 'U', 'Y']
(l, r) = mi()
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


L = list(map(int, input().split()))
n = L[0]
m = L[1]
k = n
print('YES')
for i in range((m - n + 1) // 2):
	print(k, k + 1)
	k += 2


def main():
	[l, r] = list(map(int, str.split(input())))
	if l == 1 and r == 2:
		print('YES')
		print(1, 2)
		return
	if l != 1:
		print('YES')
		i = l
		while i < r:
			print(i, i + 1)
			i += 2
		return
	print('YES')
	print(l, r)
	print(l + 1, r - 1)
	i = l + 2
	while i < r - 1:
		print(i, i + 1)
		i += 2
main()


(a, b) = map(int, input().split())
if (a - b + 1) % 2 == 0:
	print('YES')
	for i in range(a, b + 1, 2):
		print(i, i + 1)
else:
	print('No')


(l, r) = map(int, input().split())
(odd, even) = ([], [])
for x in range(l, r + 1):
	if x % 2 == 1:
		odd.append(x)
	else:
		even.append(x)
if len(odd) < 1:
	print('NO')
else:
	print('YES')
	for i in range(len(odd)):
		print(even[i], odd[i])


s = input().split()
(l, r) = (int(s[0]), int(s[1]))
print('YES')
for i in range(l, r + 1, 2):
	print('{} {}'.format(i, i + 1))


(l, r) = map(int, input().split())
x = r - l + 1
line = []
print('YES')
for i in range(x):
	line.append(l + i)
i = 0
running = True
while running:
	print(line[i], line[i + 1])
	i = i + 2
	if i >= x:
		running = False


l1 = [int(x) for x in input().split()]
low = l1[0]
high = l1[1]
print('YES')
while True:
	print(low, low + 1)
	if low + 1 == high:
		break
	low += 2


import sys
(l, r) = map(int, sys.stdin.readline().split())
sys.stdout.write('YES\n')
for i in range(l, r, 2):
	sys.stdout.write(f'{i} {i + 1}\n')


(a, b) = map(int, input().split())
l = list(range(a, b + 1))
c = 0 - -(b - a) // 2
print('YES')
while c:
	print(a, a + 1)
	a += 2
	c -= 1


(a, b) = map(int, input().split(' '))
print('YES')
while a < b:
	print(str(a) + ' ' + str(a + 1))
	a += 2


(a, b) = [int(x) for x in input().split()]
c = 0
print('YES')
for i in range(a, b + 1):
	print(i, end=' ')
	c = c + 1
	if c == 2:
		c = 0
		print()


import math
(l, r) = map(int, input().split())
ans = []
print('YES')
for (i, n) in enumerate(range(l, r + 1), start=1):
	ans.append(n)
	if i % 2 == 0:
		print(*ans)
		math.gcd(ans[0], ans[1])
		ans = []


import math
(l, r) = map(int, input().split())
val = (abs(l - r) + 1) // 2
print('YES')
for i in range((r - l) // 2 + 1):
	print(l + i * 2, l + i * 2 + 1)


(l, r) = list(map(int, input().split()))
c = l
print('YES')
while c < r:
	print(c, c + 1)
	c += 2


I = lambda : map(int, input().split())
(l, r) = I()
print('YES')
for j in range(l, r + 1, 2):
	print(j, j + 1)


import sys
import math
(l, r) = map(int, input().strip().split())
print('YES')
comma = [int(x) for x in range(l, r + 1)]
for a in range(0, len(comma) - 1, 2):
	print(comma[a], comma[a + 1])


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
int1 = lambda x: int(x) - 1
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))
ilelec = lambda : map(int1, input().split())
alelec = lambda : list(map(int1, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
(l, r) = ilele()
Y(1)
for i in range(l, r + 1, 2):
	print(i, i + 1)


(l, r) = map(int, input().rstrip().split())
pairs = (r - l + 1) // 2
print('YES')
for i in range(pairs):
	print(str(l) + ' ' + str(l + 1))
	l += 2


params = list(map(int, list(input().split())))
n = params[0]
print('YES')
while n <= params[1]:
	print(str(n) + ' ' + str(n + 1))
	n += 2


(l, r) = list(map(int, input().split()))
cnt = 0
print('YES')
for i in range(l, r + 1):
	if cnt == 0:
		cnt = 1
		print(i, end=' ')
	else:
		cnt = 0
		print(i)


(l, r) = input().split()
l = int(l)
r = int(r)
t = l
print('YES')
for i in range(int((r - l + 1) / 2)):
	print(t, t + 1)
	t = t + 2


def inp():
	return map(int, input().split())
(l, r) = inp()
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


x = input()
y = x.split()
i = int(y[1]) - int(y[0]) + 1
t = []
k = int(y[0])
if i % 2 == 0:
	print('YES')
else:
	print('NO')
while k <= int(y[1]):
	t.append(k)
	k = k + 1
j = 0
r = 0
while j <= i - 2:
	a = t[j]
	b = t[j + 1]
	u = []
	u.append(a)
	u.append(b)
	j = j + 2
	print(*u)


(l, r) = (int(i) for i in input().split())
l1 = []
l2 = []
c = 0
for i in range(l, r + 1):
	if i % 2 == 0:
		c += 1
		l1.append(i)
	else:
		l2.append(i)
print('YES')
for i in range(c):
	print(l1[i], l2[i])


__author__ = 'Jethiyaaa'

def solve():
	(l, r) = map(int, input().split())
	i = l
	if r - l + 1 & 1:
		print('NO')
		return
	print('YES')
	for _ in range(int((r - l + 1) / 2)):
		print(i, ' ', i + 1)
		i += 2
solve()


def prime_pairs(l, r):
	print('YES')
	for x in range(l, r + 1, 2):
		print(x, x + 1)
(l, r) = list(map(int, input().split()))
prime_pairs(l, r)


(L, R) = map(int, input().split())
print('YES')
for i in range((R - L + 1) // 2):
	print(L + 2 * i, L + 2 * i + 1)


(l, r) = input().split()
(l, r) = (int(l), int(r))
print('YES')
i = l
while i < r:
	print(f'{i} {i + 1}')
	i += 2


(l, r) = (int(a) for a in input().split())
mid = (r - l + 1) // 2
print('YES')
for a in range(l, r, 2):
	print(a, a + 1)


(l, r) = map(int, input().split())
a = r
b = r - 1
print('YES')
for i in range(int((r - l + 1) / 2)):
	print(a, b)
	a -= 2
	b -= 2


tmp = input().split()
print('YES')
for i in range(int(tmp[0]), int(tmp[1]) + 1, 2):
	print(i, i + 1)


def solve():
	(l, r) = map(int, input().split())
	print('YES')
	for i in range(l, r, 2):
		print(i, i + 1)

def main():
	t = 1
	for _ in range(t):
		solve()
main()


arr = [int(x) for x in input().split()]
(l, r) = (arr[0], arr[1])
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


(p, s) = map(int, input().split())
print('YES')
for i in range(p, s + 1, 2):
	print(i, i + 1)


import sys
import math
import bisect
import math
from itertools import accumulate
from itertools import combinations
import string
input = sys.stdin.readline
sys.setrecursionlimit(3000)

def inpit():
	return int(input())

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

def inpstr():
	s = input()
	return list(s[:len(s) - 1])

def inpspit():
	return map(int, input().split())
pow = math.pow
fl = math.floor
ceil = math.ceil
dis = math.hypot

def lcm(a):
	return abs(math.prod(a)) // math.gcd(*a)

def cumulativeSum(input):
	return list(accumulate(input))

def all_set(string):
	lt = []
	for i in range(0, len(string) + 1):
		for element in combinations(string, i):
			lt.append(element)
	return lt
dx = [1, -1, 0, 0]
dy = [0, 0, 1, -1]
cycle = False

def dfs(x, y, fx, fy, c):
	if x < 0 or x >= n or y < 0 or (y >= m):
		return
	if lt[x][y] != c:
		return
	if (x, y) in vis:
		global cycle
		cycle = True
		return
	vis.add((x, y))
	for i in range(0, 4):
		nx = x + dx[i]
		ny = y + dy[i]
		if nx == fx and ny == fy:
			continue
		if cycle == True:
			return
		dfs(nx, ny, x, y, c)
(l, r) = inpspit()
n = (r - l + 1) / 2
if r - l < n:
	print('NO')
	exit()
print('YES')
a = l
for i in range(int(n)):
	print(a, a + 1)
	a = a + 2


import math
(n, l) = map(int, input().split())
if l - n >= 1:
	print('YES')
else:
	print('NO')
	exit()
for i in range(n, l + 1, 2):
	print(i, end=' ')
	print(i + 1)


import math
x = list(map(int, input().split()))
l = x[0]
r = x[1]
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


import sys
import math
import bisect
import itertools
import random

def main():
	(l, r) = map(int, input().split())
	print('YES')
	for i in range(l, r + 1, 2):
		print('%d %d' % (i, i + 1))
main()


a = [int(x) for x in input().split()]
l = a[0]
r = a[1]
n = r - l + 1
print('YES')
i = l
while i < r:
	print(i, i + 1)
	i = i + 2


(j, r) = map(int, input().split())
print('YES')
for j in range(j, r + 1, 2):
	print(j, j + 1)


(start, end) = map(int, input().split())
print('YES')
for i in range(start, end + 1, 2):
	print(i, i + 1)


gi = lambda : list(map(int, input().split()))
(l, r) = gi()
print('YES')
print('\n'.join([str(k) + ' ' + str(k + 1) for k in range(l, r + 1, 2)]))


import sys
from fractions import gcd
line1 = str(sys.stdin.readline()).split()
l = int(line1[0])
r = int(line1[1])
arr = []
count = 0
print('YES')
for i in range(l, r, 2):
	print(str(i) + ' ' + str(i + 1))


def __starting_point():
	(l, r) = [int(__) for __ in input().strip().split()]
	print('YES')
	while l <= r:
		print(l, l + 1)
		l += 2
__starting_point()


(x, y) = map(int, input().split(' '))
print('YES')
for i in range(x, y, 2):
	print(i, i + 1)


def main():
	line = input()
	a = int(line.split(' ')[0])
	b = int(line.split(' ')[1])
	i = a
	print('YES')
	while i < b:
		print(i, i + 1)
		i += 2
main()


x = list(map(int, input().split()))
r = x[0]
l = x[1]
pairs = r - l + 1
pairs = pairs // 2
print('YES')
i = r
while i <= l:
	print(i, i + 1)
	i += 2


c = input()
arr = list(map(int, c.split()))
print('YES')
while arr[0] < arr[1]:
	print(arr[0], arr[0] + 1)
	arr[0] = arr[0] + 2


(j, k) = map(int, input().split())
print('YES')
for i in range(j, k + 1, 2):
	print(i, i + 1)


a_ = input()
a = [int(i) for i in a_.split(' ')]
print('YES')
i = a[0]
while i < a[1]:
	print(i, i + 1)
	i = i + 2


x = list(map(int, input().split()))
print('YES')
while x[0] < x[1]:
	print(x[0], x[0] + 1)
	x[0] += 2


st = list(map(int, input().split(' ')))
start = st[0]
finish = st[1]
if (finish - start) % 2 != 1:
	print('NO')
else:
	lsPr = []
	ls = []
	for i in range(start, finish + 1):
		if i % 2 == 0:
			lsPr.append(i)
		else:
			ls.append(i)
	print('YES')
	for i in range(len(ls)):
		print(ls[i], lsPr[i])


import sys
sys.setrecursionlimit(int(10000000.0))

def main():
	while 1:
		try:
			(a, b) = (int(x) for x in input().split())
		except EOFError:
			break
		print('YES')
		for i in range(a, b + 1, 2):
			print(i, i + 1)
main()


(l, R) = map(int, input().split())
print('YES', *range(l, R + 1))


(l, r) = map(int, input().strip().split())
print('YES')
for i in range(l + 1, r + 1, 2):
	print('%d %d' % (i, i - 1))


def gcd(a, b):
	x1 = min(a, b)
	x2 = max(a, b)
	while x2 % x1 != 0:
		a = x2 % x1
		b = x1
		x1 = min(a, b)
		x2 = max(a, b)
	return x1
(l, r) = [int(x) for x in input().split()]
if (r - l) % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(l, r + 1, 2):
		print(i, i + 1)


f = lambda : map(int, input().split())
(l, r) = f()
print('YES')
for i in range(l, r, 2):
	print(i, i + 1)


j = 0
(l, r) = map(int, input().split())
if l >= r or (r - l) % 2 == 0:
	print('NO')
else:
	c = (r - l + 1) / 2
	print('YES')
	for i in range(int(c)):
		print(l + j, l + 1 + j)
		j += 2


import math
(a, b) = map(int, input().split())
f = (b - a + 1) // 2
c = 0
x = 0
print('YES')
for i in range(a, b, 2):
	print(i, i + 1)


X = list(map(int, input().split()))
print('YES')
for i in range((X[1] - X[0] + 1) // 2):
	print(X[0], X[0] + 1)
	X[0] += 2


from math import gcd
(a, b) = map(int, input().split())
print('YES')
for i in range(a, b + 1, 2):
	print(i, i + 1)


parsed = map(int, input().split(' '))
(l, r) = parsed
n = l
print('YES')
while n < r:
	print(n, n + 1)
	n += 2


(l, r) = map(int, input().split())
print('YES')
for i in range(l, r, 2):
	print(i, i + 1, end='\n')


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
(l, r) = map(int, input().split())
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


(l, r) = map(int, input().split())
print('YES', *range(l, r + 1))


(L, R) = map(int, input().split(' '))
print('YES')
while L < R:
	print(L, L + 1)
	L += 2


from sys import stdin, stdout
(l, r) = list(map(int, stdin.readline().split(' ')))
print('YES')
for i in range(l, r, 2):
	stdout.write('%d %d\n' % (i, i + 1))


(l, r) = [int(x) for x in input().split(' ')]
print('YES')
while l + 1 <= r:
	print(l, l + 1)
	l += 2


(l, r) = (int(x) for x in input().split())
answer = []
answer.append('YES')
for i in range(l, r + 1, 2):
	pair = str(i) + ' ' + str(i + 1)
	answer.append(pair)
print(*answer, sep='\n')


(l, r) = map(int, input().split())
i = 0
j = 1
n = (r - l + 1) // 2
print('YES')
for _ in range(n):
	print(l + i, l + j)
	i = i + 2
	j = j + 2


line = input()
line = line.split()
low = int(line[0])
high = int(line[1])
print('YES')
while low <= high:
	print(low, low + 1)
	low += 2


from sys import stdin

def main():
	(a, b) = [int(x) for x in stdin.readline().strip().split()]
	print('YES')
	for i in range(a, b + 1, 2):
		print(i, i + 1)
main()


import sys

def minp():
	return sys.stdin.readline().strip()
(l, r) = map(int, minp().split())
print('YES')
for i in range(l, r, 2):
	print(str(i) + ' ' + str(i + 1))


(l, r) = map(int, input().strip().split())
if (r - l + 1) % 2 == 0:
	print('YES')
	a = l
	for x in range((r - l + 1) // 2):
		print(a, a + 1)
		a = a + 2
else:
	print('NO')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

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 pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def main():
	(l, r) = LI()
	rr = ['YES']
	for i in range(l, r, 2):
		rr.append('{} {}'.format(i, i + 1))
	return '\n'.join(rr)
print(main())


(a, b) = list(map(int, input().split()))
if a % 2 == b % 2:
	print('NO')
else:
	print('YES')
	for i in range(a, b + 1, 2):
		print(i, i + 1)


(l, r) = map(int, input().split())
if (r - l) % 2 == 0:
	print('NO')
else:
	print('YES')
	while l < r:
		print(l, l + 1)
		l = l + 2


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

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

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
(left, rite) = read_ints()
print('YES')
for i in range(left, rite + 1, 2):
	print(i, i + 1)


(l, r) = list(map(int, input().split()))
h = int((r - l + 1) / 2)
b1 = list()
b2 = list()
for i in range(l, r + 1):
	if i % 2 == 0:
		b1.append(i)
	else:
		b2.append(i)
print('YES')
for i in range(h):
	print(b1[i], b2[i])


from sys import stdin, stdout, exit

def sin():
	return stdin.readline().rstrip()

def listInput():
	return list(map(int, sin().split()))

def printBS(li):
	if not li:
		return
	for i in range(len(li) - 1):
		stdout.write('%d ' % li[i])
	stdout.write('%d\n' % li[-1])

def print_ans(l, r):
	for i in range(l, r, 2):
		print(i, i + 1)
(l, r) = listInput()
print('YES')
print_ans(l, r)


(a, b) = list(map(int, input().split()))
print('YES')
for i in range(a, b + 1, 2):
	print(i, end=' ')
	print(i + 1)


def relativelyPrimePairs(left, right):
	curr = left
	print('YES')
	while curr < right:
		print(curr, curr + 1)
		curr += 2
(x, y) = [int(inp) for inp in input().split()]
relativelyPrimePairs(x, y)


(l, r) = list(map(int, input().split()))
p = list(range(l, r + 1))
print('YES')
for x in range(0, len(p), 2):
	print(p[x], p[x + 1])


import math
(l, r) = map(int, input().split())
result = []
arr = [0 for _ in range(r - l + 1)]
for i in range(l, r):
	if arr[i - l] == 0:
		for j in range(i + 1, r + 1):
			if arr[j - l] == 0:
				if math.gcd(i, j) == 1:
					result.append((i, j))
					arr[j - l] = 1
					arr[i - l] = 1
					break
if len(result) == (r - l + 1) // 2:
	print('YES')
	for (x, y) in result:
		print(f'{x} {y}')
else:
	print('NO')


(l, r) = [int(x) for x in input().split()]
temp = (r - l + 1) // 2
st = l
li = []
flag = 1
while temp > 0:
	li.append(st)
	li.append(st + 1)
	st += 2
	temp -= 1
for j in li:
	if j < l or j > r:
		flag = 0
		break
if flag == 1:
	print('YES')
	for j in range(0, len(li) - 1, 2):
		print(li[j], '', li[j + 1])
else:
	print('NO')


(l, r) = map(int, input().split())
print('YES', *['%d %d' % (i, i + 1) for i in range(l, r + 1, 2)], sep='\n')


entrada = input().split()
l = int(entrada[0])
r = int(entrada[1])
print('YES')
while l < r:
	print(str(l) + ' ' + str(l + 1))
	l = l + 2


s = input()
c = s.split(' ')
c1 = int(c[0])
c2 = int(c[1]) + 1
if c1 <= 0 or c2 <= 0:
	print('NO')
else:
	print('YES')
	for i in range(c1, c2, 2):
		print(i, i + 1)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
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))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

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

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')
from functools import reduce

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

def quad(tup):
	(x, y) = tup
	if x > y:
		return -1
	if y > x:
		return 1
	else:
		return 0

def solve():
	(l, r) = sep()
	print('YES')
	for i in range(l, r, 2):
		print(i, i + 1)
solve()


(l, r) = map(int, input().split())
print('YES')
x = l
y = l + 1
while y <= r:
	print(x, y)
	x += 2
	y += 2


(n, m) = map(int, input().split())
k = (m - n + 1) // 2
i = 0
j = n
z = n + 1
print('YES')
while i < k:
	i += 1
	print(j, z)
	j += 2
	z += 2


from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from collections import defaultdict
import math
from fractions import Fraction as frac
from random import random
cin = stdin.readline

def cout(x):
	stdout.write(str(x) + '\n')

def var(type=int):
	return type(stdin.readline())

def readline(type=int):
	return map(type, stdin.readline().split())

def readlist(type=int):
	return list(map(type, stdin.readline().split()))

def sorted_indexes(arr):
	return sorted(range(len(arr)), key=arr.__getitem__)

def printr(arr):
	[stdout.write(str(x) + ' ') for x in arr]
	cout('')

def find_lt(a, x):
	i = bisect_left(a, x)
	if i:
		return a[i - 1]
	raise ValueError

def find_gt(a, x):
	i = bisect_right(a, x)
	if i != len(a):
		return a[i]
	raise ValueError

def dist(x, y):
	return math.sqrt(x * x + y * y)

def binary_search(arr, x):
	i = bisect_left(arr, x)
	if i == len(arr) or arr[i] != x:
		return -1
	return i
(l, r) = readline()
if (r - l) % 2 == 0:
	print('NO')
else:
	print('YES')
	for i in range(l, r, 2):
		print(i, i + 1)


(X, Y) = map(int, input().split())
print('YES')
for i in range(X, Y + 1, 2):
	print(i, i + 1)


n = list(input().split())
print('YES')
a = int(n[0])
b = int(n[1])
for i in range(a, b, 2):
	print(i, i + 1)


import re
(l, r) = [int(x) for x in input().split()]
print('YES')
for i in range(l, r, 2):
	print(str(i) + ' ' + str(i + 1))


def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
(l, r) = map(int, input().split())
flag = 1
for i in range(l, r, 2):
	if gcd(i, i + 1) != 1:
		flag = 0
if flag:
	print('YES')
	for i in range(l, r, 2):
		print(str(i) + ' ' + str(i + 1))
else:
	print('NO')


import sys
inf = float('inf')
(mod, MOD) = (1000000007, 998244353)

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()
print('YES')
for i in range(l, r, 2):
	print(i, i + 1)


(a, b) = [int(x) for x in input().split()]
print('YES')
for i in range(int((b - a + 1) / 2)):
	x = a + i * 2
	y = a + i * 2 + 1
	print(f'{x} {y}')


(l, r) = map(int, input().split())
print('YES')
print('\n'.join([str(i) + ' ' + str(i + 1) for i in range(l, r, 2)]))


def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a
test = [int(x) for x in input().split()]
lst = list(range(test[0], test[1] + 1))
stop_flag = False
pair_num = int(len(lst) / 2)
for index in range(pair_num):
	if gcd(lst[len(lst) - 1 - index * 2], lst[len(lst) - 2 - index * 2]) != 1:
		print('NO')
		stop_flag = True
		break
if not stop_flag:
	print('YES')
	for index in range(pair_num):
		print(str(lst[len(lst) - 1 - index * 2]) + ' ' + str(lst[len(lst) - 2 - index * 2]))


(a, b) = map(int, input().split())
(i, j) = (a, a)
print('YES')
while True:
	if i % 2 == 0 and i <= b:
		print(i)
	if j % 2 != 0 and j <= b:
		print(j, end=' ')
	j += 1
	i += 1
	if i > b and j > b:
		break


print('YES') or [print(i, i + 1) for i in range(*map(int, input().split()), 2)]


(l, r) = input().split()
l = int(l)
r = int(r)
dif = r - l
pairs = (dif + 1) / 2
cont = 0
if dif >= pairs:
	print('YES')
	for i in range(l, r, 2):
		print(i, i + 1)
		cont += 1
		if cont == pairs:
			break
else:
	print('NO')


(a, b) = [int(t) for t in input().split()]
if a * b > 0:
	print('YES')
	for i in range(a, b, 2):
		print(i, ' ', i + 1)
else:
	print('NO')


(l, r) = map(int, input().split())
lowest = l
biggest = r
print('YES')
half = (l + r) // 2
for i in range(l, r, 2):
	print(i, i + 1)


(a, b) = map(int, input().split())
print('YES')
i = 0
for _ in ' ' * ((b - a + 1) // 2):
	print(a + i, a + i + 1)
	a += 1
	i += 1


(l, r) = [int(s) for s in input().split()]
output = []
i = l
while i <= r - 1:
	output.append(str(i) + ' ' + str(i + 1))
	i += 2
print('YES')
print('\n'.join(output))


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

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

def rdi():
	return int(input())
(l, r) = rmap()
print('YES')
for i in range((r - l + 1) // 2):
	print(l + i * 2, l + i * 2 + 1)


from sys import stdin
(n, m) = map(int, stdin.readline().rstrip().split(' '))
if (m - n + 1) % 2 == 0:
	print('YES')
	for i in range(n, m + 1, 2):
		print(i, i + 1)
else:
	print('NO')


from collections import deque
(l, r) = map(int, input().split())
x = (r - l + 1) // 2
d = deque()
i = l
for j in range(1, x + 1):
	d.append([i, i + 1])
	i += 2
if len(d) == x:
	print('YES')
	for i in d:
		print(*i)
else:
	print('NO')


(l, r) = input().split()
l = int(l)
r = int(r)
print('YES')
i = l
while i < r:
	print(str(i) + ' ' + str(i + 1), end='\n')
	i += 2


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
scan_int = lambda : int(input())
scan_string = lambda : input().rstrip()
read_list = lambda : list(read())
read = lambda : map(int, input().split())
read_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'.upper()
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect

def solve():
	(l, r) = read()
	print('YES')
	for i in range(l, r + 1, 2):
		print(i, i + 1)
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()


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
(x, y) = get_int_list()
print('YES')
for i in range(x, y + 1, 2):
	print(i, i + 1)


line = input()
line = line.split()
limit = int(line[1])
i = int(line[0])
print('YES')
while i <= limit:
	print(i, i + 1)
	i += 2


values = input()
(l, r) = values.split()
l = int(l)
r = int(r)
split = (r - l + 1) // 2
print('YES')
for i in range(split):
	ans = str(l) + ' ' + str(l + 1)
	l += 2
	print(ans)


import sys
import string
import math
from collections import defaultdict
from functools import lru_cache
from collections import Counter
from fractions import Fraction

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

def lmi(s):
	return list(mi(s))

def tmi(s):
	return tuple(mi(s))

def mf(f, s):
	return map(f, s)

def lmf(f, s):
	return list(mf(f, s))

def js(lst):
	return ' '.join((str(d) for d in lst))

def jsns(lst):
	return ''.join((str(d) for d in lst))

def line():
	return sys.stdin.readline().strip()

def linesp():
	return line().split()

def iline():
	return int(line())

def mat(n):
	matr = []
	for _ in range(n):
		matr.append(linesp())
	return matr

def matns(n):
	mat = []
	for _ in range(n):
		mat.append([c for c in line()])
	return mat

def mati(n):
	mat = []
	for _ in range(n):
		mat.append(lmi(line()))
	return mat

def pmat(mat):
	for row in mat:
		print(js(row))

def main():
	(l, r) = mi(line())
	print('YES')
	i = l
	while i < r:
		print(i, i + 1)
		i += 2
main()


(a, b) = map(int, input().split())
if b - a == 0:
	print('NO')
	exit()
else:
	print('YES')
while a < b:
	print(a, a + 1)
	a = a + 2


import sys, math, string
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
(l, r) = M()
if l == r:
	print('NO')
else:
	x = (r - l + 1) // 2
	print('YES')
	c = l
	for i in range(x):
		print(c, c + 1)
		c += 2


def main():
	[l, r] = map(int, input().split())
	results = []
	for i in range(l, r, 2):
		results += ['%d %d' % (i, i + 1)]
	print('YES')
	print('\n'.join(results))
main()


(l, r) = map(int, input().split())
a = []
for i in range(l, r + 1):
	a.append(i)
print('YES')
for i in range(0, r - l + 1, 2):
	print(a[i], end=' ')
	print(a[i + 1])


(a, b) = map(int, input().split())
print('YES')
print(*range(a, b + 1))


import sys

def rint():
	return map(int, sys.stdin.readline().split())
(l, r) = rint()
print('YES')
for i in range((r - l + 1) // 2):
	print(l + 2 * i, l + 2 * i + 1)


import sys
(l, r) = map(int, sys.stdin.readline().split())
print('YES')
idx = l
cnt = 0
while cnt < (r - l + 1) // 2:
	print(idx, idx + 1)
	idx += 2
	cnt += 1


(L, R) = [int(x) for x in input().strip().split()]
print('YES')
for i in range(L, R, 2):
	print(i, i + 1)


(t1, t2) = map(int, input().split())
print('YES')
while t1 < t2:
	print(t1, ' ', t1 + 1)
	t1 += 2


import math

def inp():
	return int(input())

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

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
(l, r) = invr()
print('YES')
for i in range(l, r + 1, 2):
	print(i, i + 1)


(x, y) = map(int, input().split())
print('YES')
for i in range(x, y + 1):
	print(i, end=' ')
	if i % 2 == 0:
		print()


from math import gcd
Input = lambda : map(int, input().split())
(l, r) = Input()
print('YES')
for i in range(l, r + 1, 2):
	print(i + 1, i)


def checkPairs(l, r):
	if (l - r) % 2 == 0:
		print('NO')
	for i in range(l, r, 2):
		if i == l:
			print('YES')
		print(i, ' ', i + 1)
	return True
q = input().split()
l = int(q[0])
r = int(q[1])
checkPairs(l, r)


n = [int(x) for x in input().split()]
print('YES')
for i in range(n[0], n[1] - 1 + 2, 2):
	print(i, i + 1)


(n, m) = map(int, input().split())
print('YES')
print(*range(n, m + 1))


import sys
from fractions import gcd
for s in sys.stdin:
	(r, l) = (int(s.split(' ')[0]), int(s.split(' ')[1]))
	ahave = []
	times = (l - r + 1) / 2
	messages = []
	t = r
	for i in range(0, int(times)):
		for j in range(0, 4):
			if gcd(t, t + 1) == 1:
				messages += '\n{0} {1}'.format(t, t + 1)
				t += 2
				break
			else:
				t += 2
	if len(messages) != 0:
		print('YES' + ''.join(messages))
	else:
		print('NO')


print('YES')
(l, r) = map(int, input().split())
lr = [i for i in range(l, r + 1)]
for i in range(0, len(lr), 2):
	print(lr[i], lr[i + 1])