CodeEff/ECCO huggingface dataset:
# Original solution
from decimal import *
#exp = Decimal(10**23)
#rint((Decimal(11)*exp)/Decimal(10))

## coding: UTF-8
s = input().split()
t = [int(p) for p in s]
#print(t)

a = t[0]
b = t[1]
x = t[2]

'''
start = a
goal = b
while True:
    if(start % x == 0):
        break
    else:
        start += 1
#print(start)
while True:
    if(goal % x == 0):
        break
    else:
        goal -= 1
#start = Decimal(3)
#goal = Decimal(999999999999999999)

#print(Decimal(goal))
print(Decimal(Decimal(Decimal(goal) - Decimal(start)) / Decimal(x)) + Decimal(1)  ) 
#answer = ((goal - start) / x ) + 1
#print('{}'.format(int(answer)))
'''

def count_even(t, x):
    return int( Decimal(t)/ Decimal(x) )

if( a == 0):
    answer = count_even(b, x) + 1
else:
    answer = count_even(b, x) - count_even(a-1, x)
print(answer)

# Optimized solution
a, b, x = list(map(int,input().split()))

if(a%x == 0):
    A = a//x
else:
    A = a//x + 1

B = b//x
print((B-A+1))
# Original solution
arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]
x = arr[2]

c = a
left = 0
while(True):
    if c % x == 0:
        left = c
        break
    else:
        c += 1

c = b
while(True):
    if c % x == 0:
        right = c
        break
    else:
        c -= 1

print(((right - left) // x + 1))


# Optimized solution
arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]
x = arr[2]

def f(n):
    if n == -1:
        return 0
    else:
        return n // x + 1

print((f(b) - f(a-1)))
# Original solution
a, b, x = list(map(int, input().split()))
c=a//x
d=b//x
e=a%x
if(e == 0):
    print((d-c+1))
else:
    print((d-c))

# Optimized solution
a,b,x=list(map(int, input().split()))
c=b//x-a//x
if(a%x==0):
    print((c+1))
else:
    print(c)
# Original solution
a, b, x = list(map(int, input().split()))

ans = 0
p = a
while p <= b:
    if p%x == 0:
        break
    p += 1

t = b-p
s = t//x
ans = s + 1

print(ans)

# Optimized solution
a, b, x = list(map(int, input().split()))

p = 0
y = int(b//x) + 1

i = 1
#for i in range(1,y):
while x*i <= b:
    if a <= x*i:
        p = x*i
        break
    i += 1

if p != 0:
    t = b-p
    s = t//x
    ans = s + 1
    if a == 0:
        ans += 1
    print(ans)
elif a == 0:
    print((1))
else:
    print((0))
# Original solution
# ABC48, B - between a and b
import itertools
a, b, x = [int(el) for el in input().split(' ')]

for i in itertools.count(a):
    if i % x == 0:
        A = i
        break

for i in itertools.count(b, -1):
    if i % x == 0:
        B = i
        break

print((B // x - A // x +1))


# Optimized solution
# ABC48, B - between a and b
def f(n, x):
    if n == -1:
        return(0)
    else:
        return(n // x + 1)

a, b, x = [int(el) for el in input().split(' ')]
print((f(b, x) - f(a-1, x)))
# Original solution
a,b,x = list(map(int, input().split()))

s = b//x
t = (a-1)//x
print((s-t))

# Optimized solution
a,b,x = list(map(int, input().split()))

print((b//x - (a-1)//x))
# Original solution
import sys
a, b, x = list(map(int, input().split()))

if a == b == 0:
    print((1))
    sys.exit()

if x > b:
    if a != 0:
        print((0))
        sys.exit()
    else:
        print((1))
        sys.exit()

if x <= b:
    if a % x == 0:
        print((b // x - a //x + 1))
    else:
        print((b // x - a // x))



# Optimized solution
import sys
a, b, x = list(map(int, input().split()))

if a == b == 0:
    print((1))
    sys.exit()
if a % x == 0:
    print((b // x - a //x + 1))
else:
    print((b // x - a // x))
# Original solution
a, b, x = list(map(int, input().split()))

print((b // x - (a - 1) // x))

# Optimized solution
a, b, x = list(map(int, input().split()))

print((b // x - ~-a // x))
# Original solution
a, b, x = list(map(int, input().split()))


def max_search(s, t):
    for i in range(s):
        if (s-i) % t == 0:
            return (s-i) // t
    return 0

a_max = max_search(a-1, x)
b_max = max_search(b, x)
if a == 0:
    b_max += 1
print((b_max-a_max))

# Optimized solution
a, b, x = list(map(int, input().split()))
a_max = max(((a-1) // x, 0))
b_max = b // x
if a == 0:
    b_max += 1
print((b_max-a_max))
# Original solution
a,b,x=list(map(int, input().split()))
print((b//x-((a-1)//x+1)+1))

# Optimized solution
a,b,x=list(map(int, input().split()))
print((b//x-(a-1)//x))
# Original solution
A,B,X = list(map(int,input().split()))

print((B//X - (A-1)//X))

# Optimized solution
# python3 (3.4.3)
import sys
input = sys.stdin.readline

# main
A,B,X = list(map(int,input().split()))

print((B//X - (A-1)//X))
# Original solution
start,end,devide = list(map(int,input().split()))
num = 0
for i in range(start,end + 1):
  if i % devide == 0:
    num +=1
    num += (end - i) // devide
    break
print(num)

# Optimized solution
a, b, x  = list(map(int, input().split()))
 
if a != 0:
	print((b//x - (a-1)//x))
else:
	print((b//x + 1))
# Original solution
a, b, x = list(map(int, input().split()))
key = 0
count = 0

if a == b:
    if a % x == 0:
        print((1))
        exit()
    else:
        print((0))
        exit()

for i in range(a, b + 1, 1):
    if i % x == 0:
        key = i
        count += 1
        ans = count + (b - key) // x
        print(ans)
        exit()

# Optimized solution
a, b, x = list(map(int, input().split()))

big = b // x + 1
small = (a - 1) // x + 1

ans = big - small
if ans < 0:
    ans = 0

print(ans)
# Original solution
a,b,x = list(map(int,input().split()))
print((b//x-(-((-1)*a//x))+1))


# Optimized solution
a,b,x = list(map(int,input().split()))
c = -((-1 * a)//x)
d = b // x
print((d - c + 1))
# Original solution
a,b,x=list(map(int,input().split()))
ans=(b-a+1)//x
z=(b-a+1)%x
for i in range(a,a+z):
  if i%x==0:
    ans+=1
    break
print(ans)

# Optimized solution
a,b,x=list(map(int,input().split()))
if a>2:
  s=b//x
  t=(a-1)//x
  print((s-t))
elif a==1:
  print((b//x))
elif a==0:
  print((b//x+1))
# Original solution
def main():
    a, b, x = list(map(int, input().split()))

    ans = b // x - a // x
    if a % x == 0:
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()


# Optimized solution
def main():
    a, b, x = list(map(int, input().split()))

    ans = b // x - (a - 1) // x

    print(ans)


if __name__ == "__main__":
    main()
# Original solution
from sys import stdin
il = lambda func=int: list(map(func, stdin.readline().rstrip().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]

a, b, x = il()
ans = 0
for i in range(a, b+1):
    if i % x == 0:
        ans = (b-i) // x + 1
        break
print(ans)

# Optimized solution
from sys import stdin
il = lambda func=int: list(map(func, stdin.readline().rstrip().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]

a, b, x = il()
A = (a-1) // x + 1
B = b // x + 1
print((B-A))
# Original solution
a,b,x=list(map(int,input().split()))
ans=0
for s in range(a,b+1):
  if s%x==0:
    ans+=1
    break
ans+=(b-s)//x
print(ans)

# Optimized solution
a,b,x=list(map(int,input().split()))
print((b//x - (a-1)//x))
# Original solution
A, B, X = list(map(int, input().split()))
ans = max(0, B // X - (A - 1) // X)
print(ans)

# Optimized solution
A, B, X = list(map(int, input().split()))

def f(N):
    return N // X

print((f(B) - f(A - 1)))
# Original solution
a,b,x = list(map(int, input().split()))
c = (b // x) - ((a - 1) // x)
print(c)


# Optimized solution
a,b,x=list(map(int,input().split()))
c=(b//x-a//x)
if a%x==0:
  print((c+1))
else:
  print(c)
# Original solution
a, b, x = list(map(int, input().split()))
def cal(n, x):
    if n== -1:
        return 0
    else:
        return n // x + 1
print((cal(b, x) - cal(a-1, x)))

# Optimized solution
a, b, x = list(map(int, input().split()))
A = (a - 1) // x
B = b // x
print((B - A))
# Original solution
a, b, c = list(map(int, input().split()))
print(((b // c) - (a - 1) // c))

# Optimized solution
a, b, c = list(map(int, input().split()))
print((b // c - (a - 1) // c))
# Original solution
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    a, b, x = list(map(int, input().split()))
    print((b // x + 1 - max(0, (a - 1) // x + 1)))


if __name__ == '__main__':
    resolve()


# Optimized solution
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    a, b, x = list(map(int, input().split()))

    res_a = (a - 1) // x
    res_b = b // x
    print((res_b - res_a))


if __name__ == '__main__':
    resolve()
# Original solution
a, b, x = list(map(int, input().split()))
print((b // x - (a-1) // x))

# Optimized solution
a, b, x = list(map(int, input().split()))

print(((b // x) - ((a - 1)// x)))
# Original solution
A,B,X=list(map(int,input().split()))
C=A//X
D=B//X
if A%X==0 and B%X==0:
	print((D-C+1))
elif A%X!=0 and B%X==0:
	print((D-C))
elif A%X==0 and B%X!=0:
	print((D-C+1))
else:
	print((D-C))

# Optimized solution
A,B,X=list(map(int,input().split()))
C=A//X
D=B//X
if A%X==0:
	print((D-C+1))
else:
	print((D-C))
# Original solution
A,B,X=list(map(int,input().split()))
C=A//X
D=B//X
if A%X==0:
	print((D-C+1))
else:
	print((D-C))


# Optimized solution
A,B,X=list(map(int,input().split()))
print(((B//X)-(A-1)//X))
# Original solution
x = list(map(int,input().split()))
a = 0
b = x[1]+1
for i in range(x[0],x[1]+1):
    if i % x[2] ==0:
        a = 1
        b=i        
        break
c = (x[1]-b)//x[2] + 1
print(c)

# Optimized solution
x = list(map(int,input().split()))
a = 0
if x[0]%x[2]==0:
    b = x[0]
else:
     b = ((x[0] // x[2])+1)*x[2]
c = (x[1]-b)//x[2] + 1

print(c)
# Original solution
a,b,x=list(map(int,input().split()))
while a%x!=0:
	a+=1
while b%x!=0:
	b-=1
print(((b-a)//x +1))


# Optimized solution
a,b,x=list(map(int,input().split()))
a+=(-a)%x
b-=a%x
print(((b-a)//x +1))
# Original solution
a,b,x = list(map(int,input().split()))
y = b//x
if a==0:
    z = -1
else:
    z = (a-1)//x
print((y-z))

# Optimized solution
a,b,x = list(map(int,input().split()))
print((b//x-(a-1)//x))
# Original solution
a,b,x = list(map(int,input().split()))
print((b//x-(a-1)//x))

# Optimized solution
a,b,x = list(map(int,input().split()))
cnt2 = b//x
cnt1 = (a-1)//x
print((cnt2-cnt1))
# Original solution
f=lambda n,x:0 if n==-1 else n//x+1
a,b,x=list(map(int,input().split()))
print((f(b,x)-f(a-1,x)))

# Optimized solution
a,b,x=list(map(int,input().split()))
f=lambda n:0 if n<0 else n//x+1
print((f(b)-f(a-1)))
# Original solution
a, b, x = list(map(int, input().split()))
y = b - a + 1
if (y % x == 0):
  print((y // x))
else:
  z = y // x
  a2 = a + x * z
  x1 = a if (a % x == 0) else a + (x - (a % x))
  x2 = x1 + x * z
  if (x2 <= b):
    print((z + 1))
  else:
    print(z)

# Optimized solution
def f(n, x):
  return n // x + 1 if (n >= 0) else 0
a, b, x = list(map(int, input().split()))
print((f(b, x) - f(a - 1, x)))
# Original solution
import sys
from io import StringIO
import unittest

def yn(b):
    print(("Yes" if b==1 else "No"))
    return

def resolve():
    readline=sys.stdin.readline

    a,b,x=list(map(int, readline().rstrip().split()))
    if a%x==0:
        f=a
    else:
        f=a-a%x+x
        if f > b:
            print((0))
            return
    if b%x==0:
        t=b
    else:
        t=b-b%x
        if t<a:
            print((0))
            return
    print(((t-f)//x+1))

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

# Optimized solution
import sys

def yn(b):
    print(("Yes" if b==1 else "No"))
    return

def resolve():
    readline=sys.stdin.readline
    a,b,x=list(map(int, readline().rstrip().split()))
    print((b//x - (a-1)//x))
    return

if 'doTest' not in globals():
    resolve()
    sys.exit()
# Original solution
a,b,x=list(map(int,input().split()))
for i in range(a,b+1):
  if i%x==0:
    y=(b-i)//x
    print((y+1))
    exit()

print((0))

# Optimized solution
a,b,x=list(map(int,input().split()))
bb=b//x
aa=a//x
ans=bb-aa
if a%x==0:
  ans+=1
print(ans)
# Original solution
a,b,x = list(map(int, input().split()))

count=0
for i in range(b-a+1):
    if (a+i)%x == 0 :
        count+=1
        count+=(b-a-i)//x
        break
print(count)


# Optimized solution
a,b,x = list(map(int, input().split()))

count=0
if a==0 :
    count+=1

if a<=x :
    ai = x
else:
    ai = (a//x)*x
    if ai<a :
        ai +=x
if ai<=b :
    count+=1
    count+=(b-ai)//x

print(count)
# Original solution
a, b, x = list(map(int, input().split()))

print(((b//x+1)-((a-1)//x+1)))

# Optimized solution
a, b, x = list(map(int, input().split()))
print((b//x-(a-1)//x))
# Original solution
a, b, x = list(map(int, input().split()))

count = 0

for i in range(a, b+1):
    if i % x == 0:
        count += ((b - i) // x + 1)
        break


print(count)

# Optimized solution
a, b, x = list(map(int, input().split()))

print((b // x - (a - 1) // x))
# Original solution
import math
a, b, x = list(map(int, input().split()))
print((b // x - (a - 1) // x))


# Optimized solution
a, b, x = list(map(int, input().split()))
print((b // x - (a - 1) // x))
# Original solution
a, b, x = list(map(int, input().split()))
aa = (a-1) // x
bb = b // x
ans = bb-max(aa, 0)
if a == 0:
    ans += 1
print(ans)


# Optimized solution
a, b, x = list(map(int, input().split()))
bb = b // x
if a == 0:
    print((bb+1))
else:
    aa = (a-1)//x
    print((bb-aa))
# Original solution
def resolve():
    a, b, x = list(map(int, input().split()))
    ans = calc(x, b) - calc(x, a-1)
    print(ans)

def calc(x, n):
    if n == -1:
        return 0
    else:
        return n//x + 1

if __name__ == '__main__':
    resolve()

# Optimized solution
def resolve():
    a, b, x = list(map(int, input().split()))
    print((calc(b, x) - calc(a-1, x)))
def calc(num, x):
    return num // x

if __name__ == '__main__':
    resolve()
# Original solution
import math

a, b, c = list(map(int, input().split(" ")))

top = b//c
bottom = (a-1)//c
print((top - bottom))

# Optimized solution
a,b,k = list(map(int,input().split()))
temp =(a - 1 )//k
if a == 0:
  temp = -1
print((b//k - temp))
# Original solution
#B - Between a and b ...
a,b,x = list(map(int, input().split()))

if a==b:
    if a%x==0:
        print((1))
    else:
        print((0))
else:
    min_dev = 0
    for i in range(a,b+1):
        if i%x==0:
            min_dev = i
            break

    max_dev = 0
    for i in range(a,b+1)[::-1]:
        if i%x==0:
            max_dev = i
            break

    print(((max_dev-min_dev)//x+1))


# Optimized solution
#B - Between a and b ...
import math
a,b,x = list(map(int, input().split()))

if a==b:
    if a%x==0:
        print((1))
    else:
        print((0))
else:
    """
    min_dev = 0
    for i in range(a,b+1):
        if i%x==0:
            min_dev = i
            break
    """
    if a==0:
        min_dev=0
    else:
        min_dev = math.ceil(a/x)

    """
    max_dev = 0
    for i in range(a,b+1)[::-1]:
        if i%x==0:
            max_dev = i
            break
    """
    max_dev = int(b//x)
    print((max_dev-min_dev+1))
# Original solution
a,b,x = list(map(int,input().split()))
answer = 0
flag = 0
for i in range(a,b+1) :
    if i % x == 0 :
        answer += 1
        p = i
        flag += 1
        break
if flag == 1 :
    q = b-p
else :
    q = b-a
answer += q//x
print(answer)


# Optimized solution
a,b,x = list(map(int,input().split()))
B = b//x
A = (a-1)//x
print((B-A))
# Original solution
a,b,x=list(map(int,input().split()))
ans=0
if a==0:
    a+=1
    ans+=1
ans+=(b//x)-(a-1)//x
print(ans)

# Optimized solution
a,b,x=list(map(int,input().split()))
print(((b//x)-(a-1)//x))
# Original solution
a, b, x = list(map(int, input().split()))
c = a
d = b
while c % x != 0:
  c += 1
while d % x != 0:
  d -= 1
print(((d - c) // x +1))

# Optimized solution
a, b, x = list(map(int, input().split()))
c = b // x + 1
d = 0
if a - 1 > -1:
  d = (a - 1) // x + 1
else:
  d = 0
print((c - d))
# Original solution
a, b, x = list(map(int, input().split()))
cnt = b // x
cnt -= (a - 1) // x
print(cnt)

# Optimized solution
a, b, x =list(map(int, input().split()))
print(((b // x) - ((a - 1) // x)))
# Original solution
a, b, x = list(map(int, input().split()))
"""
    a~b間のxで割り切れる数は何個？
    1~b間のxで割り切れる数から1~a間のxで割り切れる数
"""
ans_b = b//x
ans_a = (a-1)//x
print((ans_b - ans_a))


# Optimized solution
a, b, x = list(map(int, input().split()))
print((b//x - (a-1)//x))
# Original solution
#!/usr/bin/env python

a, b, x = list(map(int, input().split()))

if a == b:
    if a%x == 0:
        print((1))
    else:
        print((0))
    exit()
if a%x == 0 and b%x == 0:
    ans = b//x - a//x + 1 
    print(ans)
    exit()
if a%x != 0 and b%x != 0:
    ans = b//x - a//x
    print(ans)
    exit()
if a%x == 0 and b%x != 0:
    ans = b//x - a//x + 1 
    print(ans)
    exit()
ans = b//x - a//x 
print(ans)


# Optimized solution
#!/usr/bin/env python

a, b, x = list(map(int, input().split()))

def f(n):
    global x
    if n == -1: 
        return 0
    return n//x + 1 

ans = f(b)-f(a-1)
print(ans)
# Original solution
eval(input());a=list(map(int,input().split()))
b1,b2,b4=[],[],[];ans=''
for i in a:
  if i%2!=0:
    b1.append(i)
  elif i%4==0:
    b4.append(i)
  elif i%2==0:
    b2.append(i)
if b2:
  if len(b1)<=len(b4):
    ans='Yes'
  else:
    ans='No'
else:
  if len(b1)<=len(b4)+1:
    ans='Yes'
  else:
    ans='No'
print(ans)

# Optimized solution
eval(input());a=list(map(int,input().split()))
b1,b2,b4=0,0,0
for i in a:
  if i%2!=0: b1+=1
  elif i%4==0: b4+=1
  elif i%2==0: b2+=1
print(('Yes' if b1<=b4 else 'No' if b2 else 'Yes' if b1<=b4+1 else 'No'))
# Original solution
N = int(eval(input()))
l = list(map(int, input().split()))
a, b, c = 0, 0, 0

for i in l:
    if i % 4 == 0:
        c += 1
    elif i % 2 == 0:
        b += 1
    elif not i % 2 == 0:
        a += 1

if b >= 1:
    if c >= a:
        print("Yes")
    else:
        print("No")
else:
    if c+1 >= a:
        print("Yes")
    else:
        print("No")

# Optimized solution
N = int(eval(input()))
l = list(map(int, input().split()))
a, b, c = 0, 0, 0

for i in l:
    if i % 4 == 0:
        c += 1
    elif i % 2 == 0:
        b += 1
    else:
        a += 1

if b >= 1:
    if c >= a:
        print("Yes")
    else:
        print("No")
else:
    if c+1 >= a:
        print("Yes")
    else:
        print("No")
# Original solution
from random import shuffle

n = int(eval(input()))
a = list(map(int, input().split()))

b = []
c = []

f = a.count(2)

a = [i for i in a if i != 2]

for i in range(len(a)):
    if a[i] % 4:
        b.append(a[i])
    else:
        c.append(a[i])

d = []

while b and c:
    d.append(b.pop())
    d.append(c.pop())

e = d.copy()

d.extend(b)
d.extend([2] * f)
d.extend(c)

for i in range(1, n):
    if (d[i] * d[i-1]) % 4:
        break
else:
    print('Yes')
    exit()

e.extend(b)
e.extend(c)
e.extend([2] * f)

for i in range(n - 1):
    if (e[i] * e[i+1]) % 4:
        break
else:
    print('Yes')
    exit()

e.sort()

for i in range(n - 1):
    if (e[i] * e[i+1]) % 4:
        break
else:
    print('Yes')
    exit()

for _ in range(100):
    shuffle(e)

    for i in range(n - 1):
        if (e[i] * e[i+1]) % 4:
            break
    else:
        print('Yes')
        break

print('No')

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

c0 = c1 = c2 = 0

for i in a:
    if i % 4 == 0:
        c0 += 1
    elif i % 2:
        c1 += 1
    else:
        c2 += 1

if c2:
    if c1 <= c0:
        print('Yes')
    else:
        print('No')
else:
    if c1 <= c0 + 1:
        print('Yes')
    else:
        print('No')
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))

cnt2 = 0
cnt4 = 0
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 4 != 0:
            cnt2 += 1
        else:
            cnt4 += 1

if cnt2:
    if ((n-cnt2+1)//2) <= cnt4:
        print('Yes')
    else:
        print('No')
else:
    if (n-cnt2)//2 <= cnt4:
        print('Yes')
    else:
        print('No')


# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))

cnt2 = cnt4 = 0
for i in a:
    if i % 2 == 0:
        if i % 4 != 0:
            cnt2 += 1
        else:
            cnt4 += 1

if cnt2:
    if ((n-cnt2+1)//2) <= cnt4:
        print('Yes')
    else:
        print('No')
else:
    if (n-cnt2)//2 <= cnt4:
        print('Yes')
    else:
        print('No')
# Original solution
from copy import deepcopy

def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    div2 = [0] * n
    div4 = deepcopy(div2)
    notdiv4 = deepcopy(div2)
    for i in range(n):
        if a[i] % 4 == 0:
            div4[i] = 1
        elif a[i] % 2 == 0:
            div2[i] = 1
        else:
            notdiv4[i] = 1
    num_notdiv4 = sum(notdiv4)
    num_notdiv4 += sum(div2) % 2
    if num_notdiv4 - 1 > sum(div4):
        print('No')
    else:
        print('Yes')

if __name__ == '__main__':
    main()


# Optimized solution

def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    div2 = 0
    div4 = 0
    notdiv4 = 0
    for ea in a:
        if ea % 4 == 0:
            div4 += 1
        elif ea % 2 == 0:
            div2 += 1
        else:
            notdiv4 += 1

    notdiv4 += div2 % 2
    if notdiv4 - 1 > div4:
        print('No')
    else:
        print('Yes')

if __name__ == '__main__':
    main()
# Original solution
# ABC069C - 4-adjacent (ARC080C)
def main():
    n = int(eval(input()))
    A = tuple(map(int, input().rstrip().split()))
    f, t, m = 0, 0, 0  # two, four, misc
    for i in A:
        if i % 4 == 0:
            f += 1
        elif i % 2 == 0:
            t += 1
        else:
            m += 1
    m += t % 2
    print(("Yes" if m - f <= 1 else "No"))


if __name__ == "__main__":
    main()

# Optimized solution
# ABC069C - 4-adjacent (ARC080C)
def main():
    N, *A = list(map(int, open(0).read().split()))
    f, t, m = 0, 0, 0  # two, four, misc
    for i in A:
        if i % 4 == 0:
            f += 1
        elif i % 2 == 0:
            t += 1
        else:
            m += 1
    m += t % 2
    flg = f + 1 >= m
    print(("Yes" if flg else "No"))


if __name__ == "__main__":
    main()
# Original solution
import math
N = int(eval(input()))
A = list(map(int,input().split()))
l = list()
ll = list()
for i in range(len(A)):
  if A[i]%4 == 0:
    l.append(A[i])
  if A[i]%2 == 0:
    ll.append(A[i])
four = len(l)
two = len(ll)-four
zero = N-two
a = math.floor(N/2)
if a <= four:
  print("Yes")
elif a-two/2 <= four:
  print("Yes")
else:
  print("No")

# Optimized solution
import math
N = int(eval(input()))
A = list(map(int,input().split()))
l = list()
ll = list()
for i in range(len(A)):
  if A[i]%4 == 0:
    l.append(A[i])
  if A[i]%2 == 0:
    ll.append(A[i])
four = len(l)
two = len(ll)-four
zero = N-two
a = math.floor(N/2)
if a <= four:
  print("Yes")
elif 2*a-two <= 2*four:
  print("Yes")
else:
  print("No")
# Original solution
n=int(eval(input()))
la=list(map(int,input().split()))
lc=[0]*n
for i in range(n):
  t=la[i]
  while t%2<1 and lc[i]<2:
    t//=2; lc[i]+=1
c=[lc.count(i) for i in range(3)]
print(('YNeos'[c[0]-c[2]>1 or (c[0]>c[2] 
and n%2<1)::2]))

# Optimized solution
eval(input());l=[int(i)%4 for i in input().split()];f=l.count;print(('YNeos'[f(0)+f(2)//2<len(l)//2::2]))
# Original solution
n,*l=list(map(int,open(0).read().split()))
d={1:0,2:0,4:0}
for i in l:
  if i%2: d[1]+=1
  elif i%4: d[2]+=1
  else: d[4]+=1
if d[2]: print(('YNeos'[d[1]>d[4]::2]))
else: print(('YNeos'[d[1]-1>d[4]::2]))

# Optimized solution
eval(input())
l=[int(i)%4 for i in input().split()]
c=l.count
print(('YNeos'[c(0)+c(2)//2<len(l)//2::2]))