#P9783. [ROIR 2020] 平方 (Day1)
[ROIR 2020] 平方 (Day1)
Problem Description
Translated from ROIR 2020 Day1 T1. Разность квадратов, translator ShineEternal
You are involved in developing a module for a symbolic computation system. It will be used to solve a special type of Diophantine equation, described as follows:
Given a non-negative integer , the module under development needs to find two positive integers and such that , where do not exceed .
You need to write a program that, for a given non-negative integer , finds two natural numbers and such that both of them do not exceed and their difference of squares is .
Input Format
One line with one integer .
Output Format
If such exist, print two lines. The first line should be the single string Yes. The second line should print any one pair .
If no such pair exists, output No.
3
Yes
2 1
2
No
Hint
For of the testdata, .
Constraints
| Task ID | Score | |
|---|---|---|
Translated by ChatGPT 5