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
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;
}
2020-02-15 11:59:40
Ингэж бодох байхаа
#include<stdio.h>
int main(){
int a;
scanf("%d",&a);
while((a>2)&&(a%2==0)){
a=a/2;
}
if(a==2)printf("YES\n");
else printf("NO\n");
return 0;
}
2020-01-02 05:11:42
buruu bna
2019-08-07 04:55:00
#include<iostream>
using namespace std;
int main (){
int a;
cin>>a;
while((a>2)&&(a%2==0))
a=a/2;
if(a==2)

if(a==2) cout<<("YES");
else cout<<("NO");
}
2019-01-07 14:14:14
#include<stdio.h>
int main() {
int a;
scanf("%d",&a);
while(a>2 && a%2==0){
a=a/2;
}
if(a==2) printf("YES");
else printf("NO");

}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.