P19539 [AtCoder] Given are integers S and P.
提高-
题目描述

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.
输入格式

见题面

输出格式

见题面

样例输入
3 2
样例输出
Yes