-->
当前位置:首页 > 题库

PROGRAMMING:Mathematical thought -- verifying conjecture

Luz5年前 (2021-05-10)题库489
Salted dried fish and salted fish cherishing hair are studying mathematical thought again( (HA HA)
Suppose that given two numbers a and B, we guess whether there are two integers, which add up to a and multiply by B, for example:
1+4=5,1 × 4 = 4, so there are two integers that add up to 5 and multiply by 4, namely 1 and 4
7+(-8)=-1,7 ×(- 8) = - 56, so the two integers that add up to - 1 and multiply by - 56 are 7 and - 8
So x + y = 9, X × Y = 15, is there such integers x and y? The salted fish who cherish their hair think they don't exist, which is a bit uncertain.
Can you answer quickly? Please try to verify the hypothesis of dried fish by programming.
###Input format:
The input data are pairs of integers n, m (- 10000 < n, m < 10000 and N, M is not equal to 0), which respectively represent the sum and product of integers.
###Output format:
Just output "yes" or "no" for each N and m, and make sure that there is such an integer or not.
###Input sample 1:
```in
9 15
```
###Output sample 1:
```out
No
```
###Input sample 2:
```in
1 -56
```
###Output sample 2:
```out
Yes
```







answer:If there is no answer, please comment