CodeEff/ECCO huggingface dataset:
# Original solution
n,k = list(map(int,input().split()))
p = list(map(int,input().split()))
p = sorted(p)
ans = 0
for i in range(k):
    ans += p[i]
print(ans)

# Optimized solution
n,k = list(map(int,input().split()))
A = list(map(int,input().split()))

A = sorted(A)
ans = 0
for i in range(k):
    ans += A[i]
print(ans)
# Original solution
n, k = list(map(int, input().split()))

p = list(map(int, input().split()))

li = []
for i in range(n):
    li.append(p[i-1])
        
li_int = sorted([int(n) for n in li])

li_ans = li_int[:k]

print((sum(li_ans)))

# Optimized solution
n, k = list(map(int, input().split()))
p = list(map(int,input().split()))

p.sort()
list = []

for i in range(k):
    list.append(p[i])
    
print((sum(list)))
# Original solution
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    n,k = readInt()
    p = readInt()
    p.sort()
    ans = 0
    for i in range(k):
        ans += p[i]
    print(ans)
    return

if __name__=='__main__':
    main()


# Optimized solution
n,k = list(map(int,input().split()))
p = list(map(int,input().split()))
p.sort()
ans = 0
for i in range(k):
    ans += p[i]
print(ans)
# Original solution
N, K, *p = list(map(int, open(0).read().split()))

import itertools
lis = list(itertools.combinations(list(range(N)), K))

mi = 0
for x in lis:
    cur = 0
    for pos in x:
        cur += p[pos]

    if mi == 0:
        mi = cur
    else:
        mi = min(mi, cur)

print(mi)

# Optimized solution
N, K, *p = list(map(int, open(0).read().split()))

sortp = sorted(p)

ans = 0
for x in range(K):
    ans += sortp[x]
print(ans)
# Original solution
import itertools

N,K = list(map(int,input().split()))

p = list(map(int,input().split()))

ans = []
for v in itertools.combinations(p,K):
    ans.append(sum(v))
    
print((min(ans)))

# Optimized solution
N,K = list(map(int,input().split()))

p = list(map(int,input().split()))

s = sorted(p)

ans = 0 
for i in range(N):
    ans += s[i]
    if i == K-1:
        break

print(ans)
# Original solution
n, k = list(map(int,input().split()))
p = list(map(int,input().split()))
p.sort()

print((sum(p[0:k])))


# Optimized solution
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))
p.sort()
total = 0
for i in range(k):
  total += p[i]
print(total)
# Original solution
import itertools
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

sum0 = 100100100

for i in itertools.combinations(p, k):
    sum1 = sum(i)
    if sum0 > sum1:
        sum0 = sum1
        
print(sum0)
    
    


# Optimized solution
import itertools
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

p.sort()
sum = p[0]
for i in range(1,k):
    sum += p[i]
print(sum)
# Original solution
N,K=list(map(int,input().split()))
p=list(map(int,input().split()))
import itertools
l=list(itertools.combinations(p,K))
M=999999999999999999
for i in l:
    M=min(M,sum(i))
print(M)
    






        






    
















        


























            
    


    


    
    














    


    














# Optimized solution
N,K=list(map(int,input().split()))
p=list(map(int,input().split()))
p.sort()
ans=0
for i in range(K):
    ans+=p[i]
print(ans)
# Original solution
from itertools import combinations

N, K = list(map(int,input().split()))
lists = combinations(list(range(N)),K)
s = list(map(int,input().split()))
min_result = 1000000000000
for li in lists:
    total = 0
    for l in li:
        total += s[l]
    min_result = min(min_result,total)

print(min_result)

# Optimized solution
N, K = list(map(int,input().split()))
s = list(map(int,input().split()))
s.sort()
print((sum(s[:K])))
# Original solution
from itertools import combinations
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))

ans = float('inf')

for buy_list in list(combinations(P, K)):
    ans_ = 0
    for buy in buy_list:
        ans_ += buy
    ans = min(ans, ans_)
    
print(ans)

# Optimized solution
N, K = list(map(int, input().split()))
p_list = list(map(int, input().split()))
 
p_list = sorted(p_list)
 
print((sum(p_list[:K])))
# Original solution
import itertools
N, K = list(map(int, input().split()))
p = list(map(int, input().split()))

c = itertools.combinations(p, K)
ans = 10**10
for i in c:
    ans = min(ans, sum(i))
print(ans)

# Optimized solution
N, K = list(map(int, input().split()))
p = list(map(int, input().split()))

p.sort()
print((sum(p[:K])))
# Original solution
import itertools
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
B = list(itertools.combinations(P, K))
ans = []
if N == 1:
    print((P[0]))
    exit(0)
for b in B:
    ans.append(sum(b))
print((min(ans)))

# Optimized solution
N, K = list(map(int, input().split()))
P = list(map(int, input().split()))
P.sort()
print((sum(P[0:K])))
# Original solution
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

p.sort()

ans = 0
for i in range(k):
  ans += p.pop(0)
  
print(ans)

# Optimized solution
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

p.sort()

ans = sum(p[:k])
  
print(ans)
# Original solution
import itertools
import sys
from typing import Callable, NoReturn, Tuple


def main() -> NoReturn:
    readline: Callable[[], str] = sys.stdin.readline
    n, k = list(map(int, readline().rstrip().split()))  # type: int,...
    p: Tuple[int] = tuple(int(_) for _ in readline().rstrip().split())

    if k < n // 2:
        answer: int = 10 ** 6
        for combinations in itertools.combinations(p, k):
            sum_of_comb: int = sum(combinations)
            if sum_of_comb < answer:
                answer = sum_of_comb
    else:
        not_chosen: int = 0
        for combinations in itertools.combinations(p, n - k):
            sum_of_comb: int = sum(combinations)
            if sum_of_comb > not_chosen:
                not_chosen = sum_of_comb
        answer: int = sum(p) - not_chosen

    print(answer)


if __name__ == '__main__':
    main()


# Optimized solution
import itertools
import sys
from typing import Callable, List, NoReturn


def main() -> NoReturn:
    readline: Callable[[], str] = sys.stdin.readline
    n, k = list(map(int, readline().rstrip().split()))  # type: int,...
    p: List[int] = [int(_) for _ in readline().rstrip().split()]
    p.sort()
    print((sum(p[:k])))


if __name__ == '__main__':
    main()
# Original solution
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

p.sort()
ans = int(0)
for i in range(min(n,k)):
    ans += p[i]

print(ans)

# Optimized solution
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

print((sum(sorted(p)[0:k])))
# Original solution
N, K = list(map(int, input().split()))
p = list(map(int, input().split()))

p.sort()
count = 0
for i in range(K):
    count += p[i]

print(count)

# Optimized solution
N, K = list(map(int, input().split()))
p = list(map(int, input().split()))
pin = p.sort()
print((sum(p[:K])))
# Original solution
n, k = list(map(int, input().split()))
P = sorted(list(map(int, input().split())))

ans = 0
for p in P[:k]:
    ans += p

print(ans)

# Optimized solution
n, k = list(map(int, input().split()))
P = sorted(list(map(int, input().split())))

ans = sum(P[:k])
print(ans)
# Original solution
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

import itertools

comb = list(itertools.combinations(p, k))

ans = 100000000000
for i in range(len(comb)):
    ans = min(ans, sum(comb[i]))

print(ans)
    

# Optimized solution
n, k = list(map(int, input().split()))
p = list(map(int, input().split()))

import itertools

comb = list(itertools.combinations(p, k))

ans = 100000000
for i in range(len(comb)):
    ans = min(ans, sum(comb[i]))

print(ans)
# Original solution
N = int(eval(input()))
a = list(map(int,input().split()))
b = list(map(int,input().split()))

flag = "Yes"
for i in range(N):
   A_max = max(a)
   B_max = max(b)
   if A_max > B_max:
      flag = "No"
   else:
      del a[a.index(A_max)]
      del b[b.index(B_max)]

print(flag)


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

c = 0
for i in range(N):
   if b[i] - a[i] > 0:
      c += (b[i] - a[i])//2
   elif b[i] - a[i] < 0:
      c += b[i] - a[i]

if c >= 0:
   print("Yes")
else:
   print("No")
# Original solution
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def ceil(x, y):
    return -(-x // y)


def main():
    N = int(eval(input()))
    A = [int(x) for x in input().split()]
    B = [int(x) for x in input().split()]

    sa = sum(B) - sum(A)

    x = 0
    y = 0
    for i in range(N):
        if A[i] == B[i]:
            continue
        elif A[i] > B[i]:
            x += A[i] - B[i]
        else:
            y += ceil(B[i] - A[i], 2)

    if x <= sa and y <= sa:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()


# Optimized solution
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(eval(input()))
    A = [int(x) for x in input().split()]
    B = [int(x) for x in input().split()]

    acnt = 0
    bcnt = 0

    for i in range(N):
        if A[i] == B[i]:
            continue
        elif A[i] > B[i]:
            bcnt += A[i] - B[i]
        else:
            acnt += -(-(B[i] - A[i]) // 2)
            bcnt += (B[i] - A[i]) % 2

    if acnt < bcnt:
        print("No")
    else:
        print("Yes")


if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
s = sum(b) - sum(a)
s, t = 0, 0
for i in range(n):
    if a[i] < b[i]:
        if (b[i] - a[i]) % 2:
            s += 1
            t += 1
        s += (b[i] - a[i]) // 2
    else:
        t += (a[i] - b[i])
if s < max(s, t):
    print('No')
else:
    print('Yes')

# Optimized solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
t = sum(b)-sum(a)
res=0
for i in range(n):
  if b[i]>a[i]:
    res += (b[i]-a[i]+1)//2
if res > t:
  print('No')
else:
  print('Yes')
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))

c = []
for i in range(n):
    c.append(b[i]-a[i])

d = 0

for i in range(n):
    if c[i]<0:
        d+=-c[i]
        c[i]=0

for i in range(n):
    d-=c[i]//2

if d<=0:
    print('Yes')
else:
    print('No')


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

d = 0

for i in range(n):
    c= b[i]-a[i]
    if c<0:
        d+=-c
    else:
        d-=c//2

print(('Yes' if d<1 else 'No'))
# Original solution
n=int(eval(input()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))
if sum(A)>sum(B):
    ans='No'
else:
    l=sum(B)-sum(A)
    cnt_a=l*2
    cnt_b=l
    for i in range(n):
        if A[i]>B[i]:
                cnt_b-=(A[i]-B[i])
        else:
            if (B[i]-A[i])%2==0:
                cnt_a-=(B[i]-A[i])
            else:
                cnt_a-=(B[i]-A[i])+1
                cnt_b-=1
    if cnt_a==cnt_b and cnt_a>=0:
        ans='Yes'
    else:
        ans='No'
print(ans)

# Optimized solution
n=int(eval(input()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))
if sum(A)>sum(B):
    ans='No'
else:
    c=0
    d=0
    for a,b in zip(A,B):
        if a<b:
            d+=(b-a)//2+(b-a)%2
            c+=(b-a)%2
        else:
            c+=a-b
    if d>=c:
        ans='Yes'
    else:
        ans='No'
print(ans)
# Original solution
# やっていることは単純だが、何故これで正しい答えが出るのかよくわからない

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

la = 0
lb = 0
for i in range(N):
    if a[i] > b[i]:
        la += a[i] - b[i]
    elif b[i] > a[i]:
        lb += (b[i] - a[i]) // 2

if lb >= la:
    print("Yes")
else:
    print("No")


# Optimized solution
# a_i <= b_iなら同じidxを選ぶことで揃えられる

# 操作A : a_i > b_i で b_i +=1
# sum(a-b)回「行う必要がある」

# 操作B : a_j < b_j で (この条件を外れない範囲まで)a_j +=2
# sum((b-a)//2) 回「まで行える」
# ex. b-a==1 なら操作Bは行えない

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

la = 0
lb = 0
for i in range(N):
    if a[i] > b[i]:
        la += a[i] - b[i]
    elif b[i] > a[i]:
        lb += (b[i] - a[i]) // 2

if lb >= la:
    print("Yes")
else:
    print("No")
# Original solution
N = int(eval(input()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if sum(a) == sum(b):
    if a == b:
        print("Yes")
    else:
        print("No")
elif sum(a) > sum(b):
    print("No")
else:
    for i in range(sum(b)-sum(a)):
        flg1 = 0
        flg2 = 0
        for j in range(N):
            if flg1 == 1 and flg2 ==1:
                break
            if a[j] < b[j] and flg1 == 0:
                a[j] += 2
                flg1 = 1
                if (abs(a[j]-b[j]))%2 == 1:
                    b[j] += 1
                    flg2 = 1
            if flg2 == 0:
                if b[j] < a[j]:
                    b[j] += 1
                    flg2 = 1
        if flg2 == 0:
            b[0] += 1
    if a == b:
        print("Yes")
    else:
        print("No")

# Optimized solution
N = int(eval(input()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if a == b:
    print("Yes")
elif sum(a) >= sum(b):
    print("No")
else:
    aa = 0
    bb = 0
    for i in range(N):
        if a[i]-b[i] > 0:
            bb += a[i]-b[i]
        elif b[i]-a[i] > 0:
            aa += (b[i]-a[i])//2
    if aa >= bb:
        print("Yes")
    else: 
        print("No")
# Original solution
n=int(eval(input()))
a=list(map(int,input().split()))
b=list(map(int,input().split()))

cnt1=0
cnt2=0
ma=sum(b)-sum(a)
if ma<0:
    print("No")
    exit()

for i in range(n):
    if b[i]<=a[i]:
        cnt1+=a[i]-b[i]
    else:
        if (b[i]-a[i])%2==0:
            cnt2+=(b[i]-a[i]+1)//2
        else:
            cnt2+=(b[i]-a[i]+1)//2
            cnt1+=1
#print(cnt1,cnt2)
if cnt1>ma or cnt2>ma:
    print("No")
else:
    print(("Yes" if (ma-cnt2)*2==ma-cnt1 else "No"))


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

cnt=0
for i in range(n):
    if a[i]<b[i]:
        cnt+=(b[i]-a[i])//2
    else:
        cnt-=a[i]-b[i]

if cnt<0:
    print("No")
else:
    print("Yes")
# Original solution
def main():
    import sys
    import time
    input = sys.stdin.readline
    N = int(eval(input()))
    A = [int(x) for x in input().strip().split()]
    B = [int(x) for x in input().strip().split()]
    AB = [a - b for a, b in zip(A, B)]
    if A == B:
        print('Yes')
        exit()
    elif sum(AB) > 0:
        print('No')
        exit()
    ai = 0
    bi = 0
    while ai < N and bi < N:
        if ai != N-1 and A[ai] >= B[ai]:
            ai = min(N-1, ai+1)
            continue
        if (A[bi] - B[bi]) % 2 == 1:
            A[ai] += 2
            B[bi] += 1
            continue
        if bi != N-1 and A[bi] <= B[bi]:
            bi = min(N-1, bi+1)
            continue
        cnt = min(int((B[ai]-A[ai])/2 + .5), max(1, A[bi]-B[bi]))
        A[ai] += cnt * 2
        B[bi] += cnt
        if ai == N-1 and bi == N-1:
            if A[ai] - B[bi] == 1:
                A[ai] += 2
                B[bi] += 1
            break
    
    if A == B:
        print('Yes')
    else:
        print('No')




if __name__ == '__main__':
    main()

# Optimized solution
def main():
    import sys
    import time
    input = sys.stdin.readline
    N = int(eval(input()))
    A = [int(x) for x in input().strip().split()]
    B = [int(x) for x in input().strip().split()]
    cnt = 0
    for a, b in zip(A, B):
        a_b = a - b
        if a_b > 0:
            cnt += a_b
        elif a_b < 0:
            cnt -= -a_b // 2
    
    if cnt <= 0:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
dif = sum(b) - sum(a)

numa, numb = 0, 0
for i in range(n):
    if a[i] > b[i]:
        numb += a[i] - b[i]
    elif a[i] < b[i]:
        numa += (b[i] - a[i] + 1) // 2

if numa <= dif and numb <= dif:
    print('Yes')
else:
    print('No')


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

numa, numb = 0, 0
for i in range(n):
    if a[i] > b[i]:
        numb += a[i] - b[i]
    elif a[i] < b[i]:
        numa += (b[i] - a[i] + 1) // 2

# if numa <= dif and numb <= dif:
if numa <= dif:
    print('Yes')
else:
    print('No')
# Original solution
N = int(eval(input()))
A = [int(a) for a in input().split()]
B = [int(b) for b in input().split()]

total = sum(B) - sum(A)
Aadd = 0
for i in range(N):
    if A[i] < B[i]:
        if (B[i] - A[i])%2==0:
            Aadd += (B[i]-A[i])//2
        else:
            Aadd += (B[i]-A[i])//2+1
print(("Yes" if Aadd <= total else "No"))

# Optimized solution
import sys

def solve():
    input = sys.stdin.readline
    N = int(eval(input()))
    A = [int(a) for a in input().split()]
    B = [int(b) for b in input().split()]
    C = [A[i] - B[i] for i in range(N)]
    sumA = sum(A)
    sumB = sum(B)
    addA, addB = 0, 0
    for i, c in enumerate(C):
        if c > 0: addB += c
        else: addA += (-1 * c + 1) // 2
    if addA > sumB - sumA or addB > sumB - sumA: print("No")
    else: print("Yes")

    return 0

if __name__ == "__main__":
    solve()
# Original solution
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list([x-1 for x in MII()])
#======================================================#
def main():
    n = II()
    aa = MII()
    bb = MII()
    dn = sum(bb) - sum(aa)
    if dn < 0:
        print('No')
        return None
    cnta = cntb = 0
    for a,b in zip(aa,bb):
        if a>b: cntb += a-b
        else: cnta += (b-a+1)//2
    if cnta <= dn and cntb <= dn:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

# Optimized solution
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list([x-1 for x in MII()])
#======================================================#
def main():
    n = II()
    aa = MII()
    bb = MII()
    ra = rb = 0
    for a,b in zip(aa,bb):
        if a>b: ra += a-b
        if b>a: rb += (b-a)//2
    if rb >= ra: print('Yes')
    else: print('No')

if __name__ == '__main__':
    main()
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
B = list(map(int,input().split()))
x = 0
y = 0
for i in range(N):
    if A[i]>B[i]:
        x += A[i]-B[i]
    else:
        y += (B[i]-A[i])//2
if y>=x:
    print("Yes")
else:
    print("No")

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
B = list(map(int,input().split()))
sa = sum(A)
sb = sum(B)
if sa>sb:
    print("No")
else:
    d1 = 0
    d2 = 0
    for i in range(N):
        if A[i]>B[i]:
            d1 += A[i]-B[i]
        elif B[i]>A[i]:
            d2 += (B[i]-A[i])//2
    if d2>=d1:
        print("Yes")
    else:
        print("No")
# Original solution
N = int(eval(input()))
A = list(map(int,input().split()))
B = list(map(int,input().split()))
cp = 0
cm = 0
for i in range(N):
    if A[i]>B[i]:
        cm += A[i]-B[i]
    elif B[i]>A[i]:
        cp += (B[i]-A[i])//2
if cp>=cm:
    print("Yes")
else:
    print("No")

# Optimized solution
N = int(eval(input()))
A = list(map(int,input().split()))
B = list(map(int,input().split()))
cnt1 = 0
cnt2 = 0
for i in range(N):
    if A[i]>B[i]:
        cnt1 += A[i]-B[i]
    elif A[i]<B[i]:
        cnt2 += (B[i]-A[i])//2
if cnt1<=cnt2:
    print("Yes")
else:
    print("No")
# Original solution
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
a = list(map(int, readline().split()))
b = list(map(int, readline().split()))
cnt = 0
for i in range(n):
    cnt += max(0, (b[i] - a[i] + 1) // 2)
if sum(b) - sum(a) >= cnt:
    print('Yes')
else:
    print('No')


# Optimized solution
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
a = list(map(int, readline().split()))
b = list(map(int, read().split()))
cnt = 0
for aa, bb in zip(a, b):
    v = bb - aa
    if bb > aa:
        v //= 2
    cnt += v
if cnt >= 0:
    print('Yes')
else:
    print('No')
# Original solution
N=int(eval(input()))
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]

total_do=sum(b)-sum(a)
must_do_a=0
must_do_b=0

for i in range(N):
	dist=a[i]-b[i]
	if dist<0:
		dist=-dist
		must_do_a+=int((dist+1)/2)
		if dist%2!=0:
			must_do_b+=1
	elif dist>0:
		must_do_b+=dist
left_a=total_do-must_do_a
left_b=total_do-must_do_b

if total_do>=0 and must_do_a>=must_do_b and left_a*2==left_b:
	print("Yes")
else:
	print("No")



# Optimized solution
N=int(eval(input()))
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]

can = sum(b)-sum(a)
actA,actB = 0,0
for i in range(N):
    diff = b[i]-a[i]
    if diff==0:continue
    if diff>0:
        actA+=(diff+1)//2
        actB+=diff%2
    else:
        actB+=(-diff)
leftA = can-actA
leftB = can-actB
print(("Yes" if leftA>=0 and leftA*2==leftB else "No"))
# Original solution
def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    A.sort()
    B = list(map(int, input().split()))
    B.sort()
    sum_a = sum(A)
    sum_b = sum(B)
    k = sum_b - sum_a

    now = 0
    while now < N and A[now] == B[now]:
        now += 1

    while k > 0 and now < N:
        while now < N and  A[now] == B[now]:
            now += 1
        
        if now < N:
            A[now] += 2
            B[now] += 1
            k -= 1
            if A[now] == B[now]:
                now += 1
    
    if now == N:
        print("Yes")
    else:
        print("No")
        
if __name__ == "__main__":
    main()

# Optimized solution
def main():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))

    need = 0
    stock = 0
    for a, b in zip(A, B):
        if a > b: need += (a-b)
        if b > a: stock += (b-a)//2

    if stock >= need:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()
# Original solution
N = int(eval(input()))

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

cnt = 0
for a, b in zip(A, B):
    if a > b:  # 特殊操作（他のaの力が）が必要な場合
        cnt -= a-b
    if a < b:  # 他のaに力を貸せる場合
        cnt += int((b-a)/2)

if cnt >= 0:
    print('Yes')
else:
    print('No')


# Optimized solution
N = int(eval(input()))

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

cnt = 0
for a, b in zip(A, B):
    if a > b:  # 特殊操作（他のaの力が）が必要な場合
        cnt -= a-b
    if a < b:  # 他のbに力を貸せる場合
        cnt += int((b-a)/2)

if cnt >= 0:
    print('Yes')
else:
    print('No')