Untitled

 avatar
unknown
plain_text
3 years ago
493 B
3
Indexable
#include <iostream>
using namespace std;

int main()
{
    int a, b, c;
    cin >> a;
    if (a == 4 || a == 1) cout << "Yes";
    else 
    {
        while (true)
        {
            b += 1;
            c = b * 2 + (b - 2) * 2;
            if (c == a)
            {
                cout << "Yes";
                break;
            }
            else if (c > a)
            {
                cout << "No";
                break;
            }
        }
    }
}
Editor is loading...