Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- long long n;
- long long x;
- long long y;
- cin >> n;
- int k{0};
- if (n % 2 == 0)
- {
- if (n % 4 == 0 && n > 4)
- {
- y = n/4 - 1;
- x = y + 2;
- k = 0;
- }
- else
- k = 1;
- }
- else
- {
- if (n <= 1)
- k = 1;
- else
- {
- y = n / 2;
- x = y + 1;
- k = 0;
- }
- }
- if (n == 0)
- {
- x = 1;
- y = 1;
- k = 0;
- }
- if (k == 1)
- cout << "No";
- else
- {
- cout << "Yes" << endl;
- cout << x << " " << y;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement