Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7310 - Хоёрын зэрэгт

Өгөгдсөн тоо хоёрын зэрэгт мөн бол YES үгүй бол NO гэж хэвлэ.

Input

Бүхэл тоо өгөгдөнө.

Output

2-ын зэрэгт бол YES үгүй бол NO.

Example

Input:
16

Output:
YES

Нэмсэн:Bataa
Огноо:2013-01-11
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2021-07-20 11:47:15
#include <iostream>
using namespace std;

int main()
{
int n, a=0, i=0, s=0, x ;
cin>>n;

while(n>a)
{
i++;
s=i*i;
a++;

if(n==s)
x=s;
}
if(n==x)
{
cout<< "YES";
}
else cout<<"NO";
}

2021-04-21 08:52:44
#include <stdio.h>

bool check(int n)
{
while (n>1)
{
if (n%2!=0)
{return false;
break;
}
n=n/2;
}
return true;
}


main ()
{
int n, b, a=0;
scanf("%d",&n);

if(check(n))
printf("YES");
else
printf("NO");
}
2021-04-21 08:38:57
copy dis shit
#include <bits/stdc++.h>
using namespace std;
int main (){
int n;
cin>>n;
while (n>=2 && n%2==0){
n=n/2;
}
if (n==1){
cout<<"YES"<<endl;
}
else
cout<<"NO"<<endl;

return 0;
}
2021-03-22 01:31:37
#include <stdio.h>

int main(void) {
int n,i;
scanf("%d",&n);
for(;n%2==0;n/=2)
i=n/2;
if(i==1)
printf("YES");
else
printf("NO");
} ene shalgagch buruu beno
2020-11-06 02:15:57
#include <bits/stdc++.h>
using namespace std;
int main (){
int a;
cin>>a;
while (a>=2 && a%2==0){
a=a/2;
}
if (a==1){
cout<<"YES"<<endl;
}
else cout<<"NO"<<endl;
return 0;
}
2020-07-30 04:47:51
//right code
#include <bits/stdc++.h>
using namespace std;
int main (){
int a;
cin>>a;
while (a>=2 && a%2==0){
a=a/2;
}
if (a==1){
cout<<"YES"<<endl;
}
else cout<<"NO"<<endl;
return 0;
}
2020-07-16 12:27:25
import java.util.*;
import java.lang.*;

class Main
{
static boolean isPowerOfTwo(int n) {
if (n == 0)
return false;

while (n != 1) {
if (n % 2 != 0)
return false;
n = n / 2;
}
return true;
}
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
if (isPowerOfTwo(n))
System.out.println("Yes");
else
System.out.println("No");
}
}
2020-07-16 11:54:14
import java.util.Scanner;

class Main {
public static void main(String[] args) throws java.lang.Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();

while (n > 2 && n % 2 == 0) {
n = n / 2;
}
if (n == 2)
System.out.println("YES");
else
System.out.println("NO");
}

}
2020-04-24 08:12:54
oguulber ni zov ymuu yasan ch buruu bolood baihii
2020-03-12 02:23:36
#include <iostream>
using namespace std;

int main() {
int n, a;
cin>>n;
a=2;
while(a<n)a=a*2;
if(n==a)cout<<"YES";
else cout<<"NO";
return 0;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.