Is it divisible by 2, 4 and 8?#4733

Is it divisible by 2, 4 and 8? (Editorial)

Just iterate through in this order as , and see if n \pmod i=0

Complexity

n=int(input())
for i in [2,4,8]:
    if(n%i==0):
        print("Yes")
    else:
        print("No")