AtCoder Regular Contest 108
翻译中…
Problem Statement
翻译中…
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.
翻译中…
样例
Input #1
3 2
Output #1
Yes
- For example, we have $N+M=3$ and $N \times M =2$ for $N=1,M=2$.
Input #2
1000000000000 1
Output #2
No
- There is no such pair $(N,M)$.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。