Given are integers S and P.
Is there a pair of positive integers (N,M) such that N + M = S and N \times M = P?

-----Constraints-----
 - All values in input are integers.
 - 1 \leq S,P \leq 10^{12}

-----Input-----
Input is given from Standard Input in the following format:
S P

-----Output-----
If there is a pair of positive integers (N,M) such that N + M = S and N \times M = P, print Yes; otherwise, print No.

-----Sample Input-----
3 2

-----Sample Output-----
Yes

 - For example, we have N+M=3 and N \times M =2 for N=1,M=2.

Difficulty: MEDIUM_HARD

Solutions:
(s, p) = map(int, input().split())
import math
for i in range(1, math.floor(p ** 0.5) + 1):
	if p % i == 0 and p // i + i == s:
		print('Yes')
		return
print('No')


import sys
(s, p) = map(int, input().split())

def make_divisors(n):
	divisors = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			divisors.append(i)
			if i != n // i:
				divisors.append(n // i)
	divisors.sort()
	return divisors
ls = make_divisors(p)
for i in ls:
	if i + p // i == s:
		print('Yes')
		return
print('No')


(s, p) = map(int, input().split())
n = (s + (s ** 2 - 4 * p) ** (1 / 2)) / 2
if n % 1 == 0 and n > 0:
	if s - n > 0:
		print('Yes')
	else:
		print('No')
else:
	print('No')


import sys

def input():
	return sys.stdin.readline().rstrip()

def make_divisors(n):
	(lower_divisors, upper_divisors) = ([], [])
	i = 1
	while i * i <= n:
		if n % i == 0:
			lower_divisors.append(i)
		i += 1
	return lower_divisors

def main():
	(s, p) = map(int, input().split())
	dev = make_divisors(p)
	for d in dev:
		if s - d == p // d:
			print('Yes')
			break
	else:
		print('No')

def __starting_point():
	main()
__starting_point()


[s, p] = list(map(int, input().split()))

def search(s, p):
	for n in range(1, int(s / 2) + 1):
		if n * (s - n) == p:
			return True
		if n * (s - n) > p:
			return False
	return False
if search(s, p):
	print('Yes')
else:
	print('No')


from sys import stdin
input = stdin.readline
(S, P) = list(map(int, input().split()))
N = 1
can = 0
while N * N <= P:
	if P % N == 0:
		M = P // N
		if M + N == S:
			can = 1
			break
	N += 1
print('Yes' if can else 'No')


(s, p) = map(int, input().split())
d = s ** 2 - 4 * p

def sd(a):
	s = int(a ** 0.5)
	while (1 + s) ** 2 <= a:
		s += 1
	return s
x = sd(d)
if s >= x >= 0 and d == x ** 2 and ((x + s) % 2 == 0):
	print('Yes')
else:
	print('No')


(S, P) = map(int, input().split())

def yakusu(n):
	ans = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			ans.append(i)
			if n != i ** 2:
				ans.append(n // i)
	return ans
y = yakusu(P)
ans = False
for yy in y:
	if yy + P // yy == S:
		ans = True
		break
if ans:
	print('Yes')
else:
	print('No')


(s, p) = map(int, input().split())
delta = s ** 2 - 4 * p
m = (s + delta ** 0.5) / 2
n = (s - delta ** 0.5) / 2
if m + n == s and m * n == p:
	print('Yes')
else:
	print('No')


(s, p) = list(map(int, input().split()))
d = s * s - 4 * p
p = round(d ** 0.5)
for i in range(-1, 3):
	if (p + i) ** 2 == d:
		print('Yes')
		return
print('No')


(s, p) = map(int, input().split())
for i in range(1, int(p ** 0.5) + 1):
	j = p // i
	if i + j == s and i * j == p:
		print('Yes')
		return
print('No')


import math
(S, P) = list(map(int, input().split()))
i_max = int(math.sqrt(P)) + 1
ans = 'No'
for i in range(1, i_max):
	if P % i == 0:
		q = P // i
		if i + q == S:
			ans = 'Yes'
			break
print(ans)


def main():
	(S, P) = list(map(int, input().split()))
	n = 1
	while n ** 2 <= P:
		m = S - n
		if P % n == 0 and P // n == m:
			print('Yes')
			return
		n += 1
	print('No')

def __starting_point():
	main()
__starting_point()


f = 0
(S, P) = map(int, input().split())
x = int(P ** 0.5)
for i in range(1, x + 1):
	if P % i == 0 and P // i + i == S:
		f = 1
print('Yes' if f == 1 else 'No')


(S, P) = list(map(int, input().split()))
maxn = pow(10, 6) + 5
for i in range(maxn):
	if i * (S - i) == P:
		print('Yes')
		return
print('No')


(S, P) = map(int, input().split())

def divisor(n):
	i = 1
	table = []
	while i * i <= n:
		if n % i == 0:
			table.append(i)
			table.append(n // i)
		i += 1
	table = list(set(table))
	return table
D = divisor(P)
for d in D:
	tmp = P // d
	if tmp + d == S:
		print('Yes')
		return
else:
	print('No')


import math

def factor(n):
	l = []
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			l.append(i)
	if n > 2:
		l.append(n)
	return l
(s, p) = map(int, input().split())
l = factor(p)
n = len(l)
for i in range(n):
	x = p // l[i] + l[i]
	if x == s:
		flag = True
		break
	else:
		flag = False
if flag:
	print('Yes')
else:
	print('No')


import math
(s, p) = map(int, input().split())
for i in range(1, int(math.sqrt(p)) + 1):
	if p % i == 0 and i + p // i == s:
		print('Yes')
		return
else:
	print('No')


def make_divisors(n):
	(lower_divisors, upper_divisors) = ([], [])
	i = 1
	while i * i <= n:
		if n % i == 0:
			lower_divisors.append(i)
			if i != n // i:
				upper_divisors.append(n // i)
		i += 1
	return lower_divisors + upper_divisors[::-1]
(s, p) = map(int, input().split())
a = make_divisors(p)
ans = 0
for i in range(len(a)):
	b = p // a[i]
	if b + a[i] == s:
		ans += 1
		break
if ans == 0:
	print('No')
else:
	print('Yes')


def main():
	import math
	(S, P) = map(int, input().split())
	x = (S + math.sqrt(S ** 2 - 4 * P)) / 2
	y = (S - math.sqrt(S ** 2 - 4 * P)) / 2
	if x != int(x):
		return print('No')
	if x <= 0 or y <= 0:
		return print('No')
	print('Yes')

def __starting_point():
	main()
__starting_point()


(S, P) = map(int, input().split())
for M in range(1, 10 ** 6 + 1):
	if S - M >= 0 and (S - M) * M == P:
		print('Yes')
		return
print('No')


(s, p) = map(int, input().split())

def make_divisors(n):
	(lower_divisors, upper_divisors) = ([], [])
	i = 1
	while i * i <= n:
		if n % i == 0:
			lower_divisors.append(i)
			if i != n // i:
				upper_divisors.append(n // i)
		i += 1
	return lower_divisors + upper_divisors[::-1]
l = make_divisors(p)
for i in l:
	if s - i in l:
		print('Yes')
		return
print('No')


def solve():
	(s, p) = list(map(int, input().split()))
	sqrt = int(p ** 0.5) + 1
	for i in range(1, sqrt):
		if p % i == 0:
			if i * (s - i) == p or p // i * (s - p // i) == p:
				print('Yes')
				return
	print('No')
solve()


def resolve():
	(s, p) = map(int, input().split())
	ans = 'No'
	for n in range(1, int(p ** (1 / 2)) + 1):
		if p % n == 0:
			if p // n + n == s:
				ans = 'Yes'
				break
	print(ans)

def __starting_point():
	resolve()
__starting_point()


(S, P) = map(int, input().split())
cnt = 0
for i in range(1, int(P ** 0.5) + 1):
	if P % i == 0:
		n = i
		m = P // i
		if n + m == S:
			cnt += 1
if cnt > 0:
	print('Yes')
else:
	print('No')


(s, p) = map(int, input().split())
x = int(p ** 0.5)
ans = 'No'
for a in range(1, x + 1):
	if p % a != 0:
		continue
	b = p // a
	if a + b == s:
		ans = 'Yes'
		break
print(ans)


(s, p) = list(map(int, input().split()))
for i in range(1, 10000001):
	if p % i == 0:
		if i + p // i == s:
			print('Yes')
			return
print('No')


(s, p) = map(int, input().split())
flg = False
for m in range(1, 10 ** 6 + 1):
	n = s - m
	if n > 0 and m * n == p:
		print('Yes')
		flg = True
		break
if not flg:
	print('No')


import math
(a, b) = map(int, input().split())
p = a * a - 4 * b
q = math.sqrt(p)
q = math.floor(q)
if q * q == p:
	print('Yes')
else:
	print('No')


def main():
	(s, p) = map(int, input().split())
	n = 1
	flag = False
	while n ** 2 <= p:
		if p % n == 0 and n + p // n == s:
			flag = True
			break
		n += 1
	if flag:
		print('Yes')
	else:
		print('No')

def __starting_point():
	main()
__starting_point()


(s, p) = map(int, input().split())
Del = s * s - 4 * p
m = (s + Del ** (1 / 2)) / 2
m2 = (s - Del ** (1 / 2)) / 2
if int(m) == m and int(m2) == m2 and (m > 0) and (m2 > 0):
	print('Yes')
else:
	print('No')


(s, p) = list(map(int, input().split()))
import sys
for i in range(1, int(p ** 0.5) + 1):
	m = s - i
	if i * m == p:
		print('Yes')
		return
print('No')


from decimal import Decimal
(s, p) = list(map(int, input().split()))
if Decimal(s ** 2 - 4 * p) ** Decimal(1 / 2) - int((s ** 2 - 4 * p) ** (1 / 2)) == 0:
	print('Yes')
else:
	print('No')


def solve():
	(S, P) = map(int, input().split())
	for i in range(1, int(P ** 0.5) + 1):
		if P % i == 0 and P // i + i == S:
			return True
	return False
print('Yes') if solve() else print('No')


import sys
(s, p) = list(map(int, input().split()))
i = 1
nl = []
ml = []
while i * i <= p:
	if p % i == 0:
		nl.append(i)
		ml.append(p // i)
	i += 1
for (n, m) in zip(nl, ml):
	if n + m == s:
		print('Yes')
		return
print('No')


def resolve():
	(s, p) = map(int, input().split())
	for i in range(1000002):
		if (s - i) * i == p:
			print('Yes')
			return
	else:
		print('No')
resolve()


from math import sqrt
(s, p) = input().split()
s = int(s)
p = int(p)
a = int(sqrt(s * s - 4 * p))
if a * a != s * s - 4 * p:
	print('No')
elif (a + s) % 2 != 0:
	print('No')
else:
	print('Yes')


def div(n):
	res = []
	i = int(1)
	while i * i <= n:
		if n % i == 0:
			res.append(i)
			if n != i ** 2:
				res.append(n // i)
		i += 1
	res.sort()
	return res
(s, p) = map(int, input().split())
A = div(p)
for a in A:
	if a + p // a == s:
		print('Yes')
		return
print('No')


(S, P) = map(int, input().split())
r = (S ** 2 - 4 * P) ** (1 / 2)
M1 = (S + r) / 2
M2 = (S - r) / 2
N1 = S - M1
N2 = S - M2
if M1 % 1 == 0 and 1 <= M1 < S or (M2 % 1 == 0 and 1 <= M1 < S):
	print('Yes')
else:
	print('No')


(S, P) = map(int, input().split())
c = 0
routeP = int(P ** 0.5)
for N in range(1, routeP + 1):
	if P % N == 0:
		M = int(P / N)
		if N + M == S:
			print('Yes')
			c += 1
			return
if c == 0:
	print('No')


(S, P) = list(map(int, input().split()))
v = S ** 2 - 4 * P
if v < 0:
	print('No')
elif v == 0:
	print('Yes')
else:
	left = 1
	right = v
	while right - left > 1:
		mid = (left + right) // 2
		if mid ** 2 > v:
			right = mid
		else:
			left = mid
	if left ** 2 == v:
		print('Yes')
	else:
		print('No')


(m, n) = map(int, input().split())
for i in range(1, int(n ** 0.5) + 1):
	if n % i == 0:
		if i + n // i == m:
			print('Yes')
			return
print('No')


(S, P) = map(lambda x: int(x), input().split())
ans = 'No'
for n in range(1, int(P ** (1 / 2)) + 1):
	if n + P / n == S:
		ans = 'Yes'
print(ans)


(s, p) = map(int, input().split())
ans = 'No'
for i in range(1, 1000050):
	if i * (s - i) == p:
		ans = 'Yes'
		break
print(ans)


import copy
import math
import time
import statistics
import math
import itertools
import bisect
import sys
from decimal import *
from collections import deque

def get_int():
	return int(input())

def get_string():
	return input()

def get_int_list():
	return [int(x) for x in input().split()]

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

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

def get_string_char_list():
	return list(str(input()))
sys.setrecursionlimit(10 ** 6)

def main():
	start = time.time()
	(s, p) = get_int_multi()
	m1 = (s + (s ** 2 - 4 * p) ** (1 / 2)) / 2
	m2 = (s - (s ** 2 - 4 * p) ** (1 / 2)) / 2
	if round(m1) == m1 and round(m2) == m2 and (m1 > 0) and (m2 > 0):
		print('Yes')
	else:
		print('No')

def __starting_point():
	main()
__starting_point()


(s, p) = [int(x) for x in input().split()]
i = 1
while i * i <= p:
	if p % i == 0:
		if i + p // i == s:
			print('Yes')
			return
	i += 1
print('No')


(s, p) = map(int, input().split())
for i in range(10 ** 6 + 10):
	if i * (s - i) == p:
		print('Yes')
		return
print('No')


import math as ma
(a, b) = map(int, input().split())
x = int(ma.sqrt(b)) + 1
f = False
for i in range(1, x):
	if b % i == 0:
		if b // i + i == a:
			f = True
			break
if f:
	print('Yes')
else:
	print('No')


(S, P) = list(map(int, input().split()))
i = 1
while i * i <= P:
	if P % i == 0 and i + P // i == S:
		print('Yes')
		return
	i += 1
print('No')


(s, p) = map(int, input().split())
x = 1
while x ** 2 <= p:
	if p % x == 0:
		y = p // x
		if x + y == s:
			print('Yes')
			return
	x += 1
print('No')


import math

def main():
	(s, p) = list(map(int, input().split()))
	try:
		ans_1 = math.floor(s + math.sqrt(s ** 2 - 4 * p)) // 2
	except:
		print('No')
		return
	for _ in range(-1, 2):
		ans_2 = s - ans_1
		if ans_2 > 0 and ans_1 * ans_2 == p:
			print('Yes')
			return
	print('No')
	return
main()


(s, p) = map(int, input().split())
for n in range(1, p + 1):
	if n * n > p:
		break
	if p % n == 0 and n + p // n == s:
		print('Yes')
		return
print('No')


import math
(s, p) = map(int, input().split())
ans = False
for i in range(1, int(math.sqrt(p)) + 1):
	if p % i == 0:
		if s == p / i + i:
			ans = True
			break
if ans:
	print('Yes')
else:
	print('No')


(S, P) = map(int, input().split())
if S == 0 and P == 0:
	print('Yes')
else:
	N = (-S + pow(S ** 2 - 4 * P, 0.5)) / 2
	M = (-S - pow(S ** 2 - 4 * P, 0.5)) / 2
	if int(N) == 0 or int(M) == 0:
		print('No')
	elif N.is_integer() == False or M.is_integer() == False:
		print('No')
	else:
		print('Yes')


import math
import numpy as np
import sys
input = sys.stdin.readline

def main():
	(s, p) = list(map(int, input().split()))
	i = 1
	while i ** 2 <= p:
		if s == i + p / i:
			print('Yes')
			return 0
		i += 1
	print('No')
main()


def __starting_point():
	(s, p) = list(map(int, input().split()))
	x = s * s - 4 * p
	x_ = int(x ** 0.5)
	if x_ * x_ != x:
		print('No')
	else:
		x = int(s + x_) / 2
		print('Yes' if x * (s - x) == p else 'No')
__starting_point()


import math
(s, p) = map(int, input().split())
l = []
for i in range(1, int(math.sqrt(p)) + 1):
	if p % i == 0:
		l.append(i)
for i in l:
	j = p // i
	if i + j == s:
		print('Yes')
		return
print('No')


(s, p) = list(map(int, input().split()))
import math
tmp = s * s - 4 * p
if tmp < 0:
	print('No')
	return
m1 = (s + math.sqrt(tmp)) / 2
m2 = (s - math.sqrt(tmp)) / 2
if tmp == int(tmp):
	if m1 == int(m1) and m1 > 0:
		if s - int(m1) > 0:
			print('Yes')
			return
	if m2 == int(m2) and m2 > 0:
		if s - int(m2) > 0:
			print('Yes')
			return
print('No')


import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce
rr = lambda : sys.stdin.readline().rstrip()
rs = lambda : sys.stdin.readline().split()
ri = lambda : int(sys.stdin.readline())
rm = lambda : list(map(int, sys.stdin.readline().split()))
rf = lambda : list(map(float, sys.stdin.readline().split()))
rl = lambda : list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod1 = 10 ** 9 + 7
mod2 = 998244353
al = 'abcdefghijklmnopqrstuvwxyz'
Al = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
(s, p) = rm()
for i in range(1, 10 ** 6 + 1):
	if p % i == 0 and i + p // i == s:
		print('Yes')
		return
print('No')


(s, p) = map(int, input().split())
ans = 'No'
for i in range(1, int(p ** 0.5) + 1):
	if i * (s - i) == p:
		ans = 'Yes'
print(ans)


(S, P) = map(int, input().split())
a = 0
for i in range(1, min(10 ** 6, S // 2) + 1):
	if i * (S - i) == P:
		a += 1
if a == 0:
	print('No')
else:
	print('Yes')


def prime_decomposition(n):
	ans = []
	i = 1
	while i * i <= n:
		if n % i == 0:
			ans.append((i, n / i))
		i += 1
	return ans

def main():
	(S, P) = map(int, input().split())
	kouho = prime_decomposition(P)
	a = 'No'
	for i in kouho:
		if sum(i) == S:
			a = 'Yes'
	print(a)

def __starting_point():
	main()
__starting_point()


(S, P) = map(int, input().split())
for i in range(1, int(P ** 0.5) + 1):
	if i * (S - i) == P:
		print('Yes')
		return
print('No')


import math
(s, p) = map(int, input().split())
(b, c) = (-s, p)
tmp1 = (-b + math.sqrt(b ** 2 - 4 * c)) / 2
tmp2 = (-b - math.sqrt(b ** 2 - 4 * c)) / 2
n1 = s - tmp1
n2 = s - tmp2
check = False
if int(n1) == n1 and n1 > 0:
	check = True
if int(n1) == n2 and n2 > 0:
	check = True
print('Yes' if check else 'No')


(s, p) = map(int, input().split())
for i in range(1, 1000001):
	if p % i != 0:
		continue
	elif i + p // i == s:
		print('Yes')
		break
else:
	print('No')


import sys
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

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

def main():
	(S, P) = list(map(int, input().split()))
	cand = []
	for i in range(1, int(P ** 0.5) + 1):
		if P % i == 0:
			cand.append((i, P // i))
	for (n, m) in cand:
		if n + m == S:
			print('Yes')
			return
	print('No')

def __starting_point():
	main()
__starting_point()


(n, m) = map(int, input().split())
i = 1
while i ** 2 <= m:
	if m % i == 0:
		if i + m // i == n:
			print('Yes')
			return
	i += 1
print('No')


import math
from collections import Counter
import itertools
from math import sqrt
ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))
(s, p) = mi()
for i in range(1, 1000010):
	if i * (s - i) == p:
		print('Yes')
		return
print('No')


import math
(s, p) = list(map(int, input().split()))
max_range = math.sqrt(10 ** 13)
for i in range(int(max_range)):
	if i * (s - i) == p:
		print('Yes')
		return
print('No')


(s, p) = list(map(int, input().split()))
n1 = (s + ((-s) ** 2 - 4 * p) ** 0.5) / 2
n2 = (s - ((-s) ** 2 - 4 * p) ** 0.5) / 2
n1 = int(n1)
n2 = int(n2)
m1 = s - n1
m2 = s - n2
if n1 + m1 == s and n1 * m1 == p:
	print('Yes')
elif n2 + m2 == s and n2 * m2 == p:
	print('Yes')
else:
	print('No')


(s, p) = map(int, input().split())
for i in range(2000000):
	if (s - i) * i == p:
		print('Yes')
		return
print('No')


(s, p) = map(int, input().split())
ans = False
i = 1
while i * i <= p:
	if i * (s - i) == p:
		ans = True
	i += 1
print('Yes' if ans else 'No')


(s, p) = list(map(int, input().split()))
det = s ** 2 - 4 * p
if det >= 0 and int(det ** 0.5) ** 2 == det:
	ans = 'Yes'
else:
	ans = 'No'
print(ans)


def main():
	import sys
	input = sys.stdin.readline
	(S, P) = [int(x) for x in input().strip().split()]
	for i in range(1, int(P ** 0.5) + 1):
		if P % i > 0:
			continue
		if i + P // i == S:
			print('Yes')
			return True
	else:
		print('No')

def __starting_point():
	main()
__starting_point()


(S, P) = list(map(int, input().split()))
ans = False
for n in range(1, int(P ** 0.5) + 1):
	if P % n == 0:
		m = P // n
		if n + m == S:
			ans = True
if ans:
	print('Yes')
else:
	print('No')