Harryxun/stf_run huggingface dataset:
w,h,x,y = map(float, input().split())
    if (abs(w//2-x)>abs(h//2-y)):
        print("{:.6f} {}".format(min(y*w,(h-y)*w),0))
    elif (abs(w//2-x)<abs(h//2-y)):
        print("{:.6f} {}".format(min(x*h,(w-x)*h),0))
    else:
        print("{:.6f} {}".format(min(x*h,(w-x)*h),1))

### FIXED CODE ###

w,h,x,y = map(float, input().split())
print('{:.6f} {}'.format(float(w)*float(h)/2, int(x+x==w and y+y==h)))
A, B, C, D = map(int, input())
s = max(A, C)
e = min(B, D)
span = max(0, e - s)
print(span)

### FIXED CODE ###

A, B, C, D = map(int, input().split())
s = max(A, C)
e = min(B, D)
span = max(0, e - s)
print(span)
import sys

a = sys.argv
i1 = int(a[1])
i2 = int(a[2])

if i1 < 10 and i2 < 10:
  return i1 * i2
else:
  return -1
  
  

### FIXED CODE ###

a,b =map(int,input().split())
ai = int(a)
bi = int(b)
 
if ai < 10 and bi < 10:
  print(ai * bi)
else:
  print(-1)
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline
import numpy as np

def main():
    numbers=[]
    a,b,k = map(int,input().split())
    numbers=np.arange(a,b+1)
    A=set(numbers[:k])
    B=set(numbers[-k:])
    answers = A|B
    
    for i in sorted(answers):
        print(i)


if __name__=="__main__":
    main()

### FIXED CODE ###

#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline
import numpy as np

def main2():
    A,B,K=map(int,input().split())
    if A+K-1>=B-K+1:
        for i in range(A,B+1):
            print(i)
    else:
        for i in range(A,A+K):
            print(i)
        for i in range(B-K+1,B+1):
            print(i)

def main():
    numbers=[]
    a,b,k = map(int,input().split())
    numbers=np.arange(a,b+1)
    A=set(numbers[:k])
    B=set(numbers[-k:])
    answers = A|B
    
    for i in sorted(answers):
        print(i)

if __name__=="__main__":
    main2()
import copy
[n,x]=list(map(int,input().split()))
a=list(map(int,input().split()))
a0=copy.copy(a)
ans=0
if a[0]+a[1]>x and a[0]>x:
	a[0]-=a[0]-x
	ans+=a[0]-x
		if a[0]+a[1]>x:
			a[1]=0
			ans+=a[1]
	
for i in range(1,n-1):
	if a[i]+a[i+1]>x:
		a[i+1]-=a[i]+a[i+1]-x
		ans+=a[i]+a[i+1]-x
print(ans)

### FIXED CODE ###

import copy
[n,x]=list(map(int,input().split()))
a=list(map(int,input().split()))
a0=copy.copy(a)
ans=0
if a[0]+a[1]>x and a[0]>x:
	ans+=a[0]-x
	a[0]-=a[0]-x
	if a[0]+a[1]>x:
		ans+=a[1]
		a[1]=0	
for i in range(n-1):
	if a[i]+a[i+1]>x:
		ans+=a[i]+a[i+1]-x
		a[i+1]-=a[i]+a[i+1]-x
		
print(ans)
n,m,r=map(int,input().split())
r-=m*n
if r<0:print(0)
else:
 a=1
 for i in range(r):a*=i+n/~-i
 print(int(a))


### FIXED CODE ###

n,m,r=map(int,input().split())
r-=m*n
if r<0:print(0)
else:
 d=1
 for i in range(r):d*=i+1
 u=1
 for i in range(r):u*=i+n
 print(u//d)
while True:
 a,op,b=raw_input().split()
 if op=="?":break
 if op=="+":print int(a)+int(b)
 if op=="-":print int(a)-int(b)
 if op=="*":print int(a)int(b)
 if op=="/":print int(a)/int(b)

### FIXED CODE ###

while True:
 a,op,b=raw_input().split()
 if op=="?":break
 if op=="+":print int(a)+int(b)
 if op=="-":print int(a)-int(b)
 if op=="*":print int(a)*int(b)
 if op=="/":print int(a)/int(b)
from collections import Counter
n = int(input())
s = input()
d = Counter(s)
f = [d[i] for i in d]
c = f[0] * f[1] * f[2]
 


for i in range(n):
    for j in range(i + 1, n):
        k = j + j - i
        if k < n and s[i] != s[j] and s[j] != s[k] and s[k] != s[i]:
            c -= 1
print(c)            

### FIXED CODE ###

import sys

n = int(sys.stdin.readline().rstrip())
s = sys.stdin.readline().rstrip()
r = []
b = []
g = []
for i, si in enumerate(s):
    if si == 'R':
        r.append(i + 1)
    elif si == 'G':
        g.append(i + 1)
    elif si == 'B':
        b.append(i + 1)
count = 0
for i in range(n):
    for j in range(i + 1, n):
        k = j + j - i
        if k < n and s[i] != s[j] and s[j] != s[k] and s[k] != s[i]:
            count += 1
print(len(r) * len(g) * len(b) - count)
import sys
from collections import deque
import numpy as np

def main():
    n = int(sys.stdin.readline().rstrip())
    ab = np.array(sys.stdin.read().split(), dtype=np.int32).reshape(-1, 2)

    G = [[] for _ in range(n + 1)]
    for a, b in ab:
        G[a].append(b)
        G[b].append(a)
    
    parent = np.zeros(n + 1, dtype=np.int32)
    color = np.zeros((n + 1, n + 1), dtype=np.int32)
    root = 1
    ng = None
    q = deque()
    q.append((root, ng))

    while q:
        x, ng = q.popleft()
        c = 1
        for y in G[x]:
            if y == parent[x]:
                continue
            parent[y] = x
            if c == ng:
                c += 1
            color[x][y] = c
            color[y][x] = c
            q.append((y, c))
            c += 1

    print(np.amax(color))
    for a, b in ab:
        print(color[a][b])
            
if __name__ == '__main__':
    main()

### FIXED CODE ###

# 2019-11-24 20:59:47(JST)
import sys

def main():
    n = int(sys.stdin.readline().rstrip())
    m = map(int, sys.stdin.read().split())
    ab = list(zip(m, m))

    graph = [[] for _ in range(n + 1)]
    for a, b in ab:
        graph[a].append(b)
        graph[b].append(a)

    root = 1
    parent = [0] * (n + 1)
    order = []
    stack = [root]

    while stack:
        x = stack.pop()
        order.append(x)
        for y in graph[x]:
            if y == parent[x]:
                continue
            parent[y] = x
            stack.append(y)

    color = [-1] * (n + 1)
    for x in order:
        ng = color[x]
        c = 1
        for y in graph[x]:
            if y == parent[x]:
                continue
            if c == ng:
                c += 1
            color[y] = c
            c += 1

    res = []
    for a, b in ab:
        if parent[a] == b:
            res.append(color[a])
        else:
            res.append(color[b])

    print(max(res))
    print('\n'.join(map(str, res)))


if __name__ == '__main__':
    main()
import numpy as np

n = int(input())

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

y = np.zeros((n, 1), dtype=np.int)

for i, wa in enumerate(a):
    y[i][0] = wa

A = np.zeros((n, n), dtype=np.int8)

exit()

for i in range(n-1):
    A[i][i] = 1
    A[i][i+1] = 1

A[n-1][n-1] = 1
A[n-1][0] = 1

S = np.linalg.solve(A,y)*2

for i in range(n-1):
    print(int(S[i][0]), end=" ")
print(int(S[n-1][0]))


### FIXED CODE ###

import numpy as np
import sys

n = int(input())

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

a_sum = sum(a)
# x[i]はi番目のダムに溜まった水の半分
x = []

x_0 = int(a_sum/2)

for i in range(int((n-1)/2)):
    x_0 -= a[2*i+1]

x.append(x_0)
x_tmp = x_0

for i in range(n-1):
    x_tmp = a[i] - x_tmp
    x.append(x_tmp)

for wa in x:
    print(wa*2, end=' ')
s=input()
a=0
for i in range(1,n):
    if s[i]!=s[i-1]:
        a+=1
print(a)

### FIXED CODE ###

s=input()
a=0
for i in range(1,len(s)):
    if s[i]!=s[i-1]:
        a+=1
print(a)
import sys

N, K = (int(x) for x in input().split())
H = list(map(int, input().split()))
ans=0

if K>=N:
  print(0)
  sys.exit(0)
  
H.sort(reverse=True)
for i in range(K):
  del H[i]
for i in range(N-K):
  ans+=H[i]
print(ans)

### FIXED CODE ###

import sys

N, K = (int(x) for x in input().split())
H = list(map(int, input().split()))
ans=0

if K>=N:
  print(0)
  sys.exit(0)
  
H.sort(reverse=True)
del H[0:K]
for i in range(len(H)):
  ans+=H[i]
print(ans)
import math
N = int(input())
GCD = [[math.gcd(i, j) for i in range(1, 10)] for j in range(1, 10)]
all_gcd = [GCD[GCD[i][j]][m] for i in range(1, N+1) for j in range(1, N+1) for m in range(1, N+1)]
print(sum(all_gcd))


### FIXED CODE ###

import math
N = int(input())
all_gcd = []
for i in range(1, N+1):
  for j in range(1, N+1):
    x = math.gcd(i, j) if i != j else i
    for m in range(1, N+1):
      y = math.gcd(x, m) if x != m else x
      all_gcd.append(y)

print(sum(all_gcd))
a,b,c = map(int, input().split())

if (a < b):
  return True if a < c and c < b else False

if (a > b):
  return True if b < c and c < a else False

### FIXED CODE ###

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

if a < b :
  ans = 'Yes' if a < c and c < b else 'No'

if a > b :
  ans =  'Yes' if b < c and c < a else 'No'

print(ans)
x = input()
y = input()

groupA = [1,3,5,7,8,10,12]
groupB = [4,6,9,11]
groupC = [2]

if x in groupA and y in groupA:
    print("Yes")
elif x in groupB and y in groupB:
    print("Yes")
elif x in groupC and y in groupC:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

x,y = [int(i) for i in input().split()]

groupA = [1,3,5,7,8,10,12]
groupB = [4,6,9,11]
groupC = [2]

if x in groupA and y in groupA:
    print("Yes")
elif x in groupB and y in groupB:
    print("Yes")
elif x in groupC and y in groupC:
    print("Yes")
else:
    print("No")
import re
def kezuru(str):
    if str.find('()') == -1:
        return str
    else:
        return kezuru(str.replace('()',''))

n = input()
str = input()
kezutta = kezuru(str)
#print('(' * len(re.search('\)+',kezutta).group(0)) + str + ')' * len(re.search('\(+',kezutta).group(0)))
n1 = 0
m1 = re.search('\)+',kezutta)
if m1:
    n1 = len(m1.group(0))
n2 = 0
m2 = re.search('\(+',kezutta)
if m2:
    n2 = len(m2.group(0))
print(n1 * '(' + str + n2 * ')')

### FIXED CODE ###

num = input().split()
a = int(num[0]) * 100 + int(num[1]) * 10 + int(num[2])
if a % 4 == 0:
    print("YES")
else:
    print("NO")
i = 0

while True:
  i += 1
  n = input()
  if n = 0: break:
  print('Case ' +str(i) +':' + n)



### FIXED CODE ###

case = 0
while 1:
    case += 1
    n = int(input())
    if n == 0: break
     
    print("Case {}: {}".format(case, n))
def tramp(gen):
    stack = [gen]
    val = None
    while stack:
        try:
            stack.append(stack[-1].send(val))
            val = None
        except StopIteration as e:
            stack.pop()
            val = e.value # e.args
    return val
    
N, M, K = map(int, input().split())
adj = [[] for _ in range(N)]
blks = [set() for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    adj[a - 1].append(b - 1)
    adj[b - 1].append(a - 1)
for _ in range(K):
    a, b = map(int, input().split())
    blks[a - 1].add(b - 1)
    blks[b - 1].add(a - 1)
vis = [False] * N
def go(curr):
    if vis[curr]:
        return
    vis[curr] = True
    comp.add(curr)
    for n in adj[curr]:
        yield go(n)
ans = [0] * N
for i in range(N):
    comp = set()
    if vis[i]:
        continue
    tramp(go(i))
    for i in comp:
        x = len(comp) - 1 - len(adj[i])
        for k in blks[i]:
            if k in comp:
                x -= 1
        ans[i] = x
print(*ans)


### FIXED CODE ###


def tramp(gen):
    stack = [gen]
    val = None
    while stack:
        try:
            stack.append(stack[-1].send(val))
            val = None
        except StopIteration as e:
            stack.pop()
            val = e.args
    return val
    
N, M, K = map(int, input().split())
adj = [[] for _ in range(N)]
blks = [set() for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    adj[a - 1].append(b - 1)
    adj[b - 1].append(a - 1)
for _ in range(K):
    a, b = map(int, input().split())
    blks[a - 1].add(b - 1)
    blks[b - 1].add(a - 1)
vis = [False] * N
def go(curr):
    if vis[curr]:
        return
    vis[curr] = True
    comp.add(curr)
    for n in adj[curr]:
        yield go(n)
ans = [0] * N
for i in range(N):
    comp = set()
    if vis[i]:
        continue
    tramp(go(i))
    for i in comp:
        x = len(comp) - 1 - len(adj[i])
        for k in blks[i]:
            if k in comp:
                x -= 1
        ans[i] = x
print(*ans)
N, K, Q = map(int, input().split()) 
score = np.array([K]*N)

def change_score(N ,A, score):
    score = score - np.array([1]*N)
    score[A-1] = score[A-1] + 1
    return score

for i in range(Q):
    A = int(input())
    score = change_score(N, A, score)
    #print(score)
    f_score = score

for i in f_score:
    if i > 0:
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

import numpy as np

N, K, Q = map(int, input().split()) 
score = np.array([0]*N)

def change_score(N ,A, score):
    #score = score - np.array([1]*N)
    score[A-1] = score[A-1] + 1
    return score

for i in range(Q):
    A = int(input())
    score = change_score(N, A, score)
    #print(score)
    f_score = score

for i in f_score:
    if i + K - Q > 0:
        print("Yes")
    else:
        print("No")
N,A,B = map(int,input().split())
ab = A+B

qaws = ""
c = 0
while(N >= c):
  qaws = qaws + "B"*A
  qaws = qaws + "R"*B
  c += 1
print(qaws)
print(qaws[:N].count("B"))

### FIXED CODE ###

n,a,b=map(int,input().split())
ans = n//(a+b)*a
r = n%(a+b)
print(min(r,a)+ans)
#!/usr/bin/env python
from math import sqrt

def gen_primes(X):
    D = [0] * (X+1)
    is_prime = [True for _ in range(0, X+1)]
    is_prime[0] = False
    is_prime[1] = False
    primes = []
    for n in range(2, int(sqrt(X))+1):
        if is_prime[n]:
            primes.append(n)
            j = n*2
            D[n] = n
            while j <= X:
                is_prime[j] = False
                if D[j] == 0:
                    D[j] = n
                j += n
    for n in range(int(sqrt(X)), X+1):
        if is_prime[n]:
            D[n] = n
            primes.append(n)
    return primes, D


def solve(N, A):
    primes, D = gen_primes(10**6)
    C = [0] * len(primes)

    for a in A:
        while a > 1:
            d = D[a]
            while a % d == 0:
                a //= d
            C[d] += 1
        
    M = max(C)
    if M <= 1:
        print("pairwise coprime")
    elif M != N:
        print("setwise coprime")
    else:
        print("not coprime")

N = int(input())
A = [int(x) for x in input().split()]
solve(N, A)


### FIXED CODE ###

#!/usr/bin/env python
from math import sqrt
from collections import Counter

def gen_primes(X):
    D = [0] * (X+1)
    is_prime = [True for _ in range(0, X+1)]
    is_prime[0] = False
    is_prime[1] = False
    primes = []
    for n in range(2, int(sqrt(X))+1):
        if is_prime[n]:
            primes.append(n)
            j = n*2
            D[n] = n
            while j <= X:
                is_prime[j] = False
                if D[j] == 0:
                    D[j] = n
                j += n
    for n in range(int(sqrt(X)), X+1):
        if is_prime[n]:
            D[n] = n
            primes.append(n)
    return primes, D


def solve(A):
    N = len(A)
    primes, D = gen_primes(10**6)
    C = [0] * (primes[-1]+1)

    for a in A:
        a_ = a
        while a > 1:
            d = D[a]
            while a % d == 0:
                a //= d
            C[d] += 1
        
    M = max(C)
    if M <= 1:
        print("pairwise coprime")
    elif M != N:
        print("setwise coprime")
    else:
        print("not coprime")

#solve([x for x in range(1, 10**6+1)])
N = int(input())
A = [int(x) for x in input().split()]
solve(A)
A = list(map(int, input().split()))
N = int(input())
count = 0
for a in A:
  if (a % 2 == 0 and a % 3 != 0) and (a % 2 == 0 and a % 5 != 0):
    count = count + 1

if count >= 1 :
  print('DENIED')
else:
  print('APPROVED')

### FIXED CODE ###

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

for i in A:
    i = int(i)
    if i % 2 == 0:
        if i % 3 !=0 and i % 5 !=0:
            print("DENIED")
            exit()
print("APPROVED")
while True:
    try:
        string = [input() for _ in range(8)]
        string = [int(l) for line in string for l in line] + [0]*16
        one = string.index(1)
        s = string[one:]
        ones = [[1, 8, 9], [8, 16, 24], [1, 2, 3],
                [7, 8, 15], [1, 9, 10], [8, 9, 17], [1, 7, 8]]
                ans = {0: "A", 1: "B", 2: "C", 3: "D", 4: "E", 5: "F", 6: "G"}
        for k, o in enumerate(ones):
            if all([s[o[0]], s[o[1]], s[o[2]]]):
                print(ans[k])
        input()
    except:
        break

### FIXED CODE ###

while True:
    try:
        string = [input() for _ in range(8)]
        string = [int(l) for line in string for l in line] + [0]*32
        one = string.index(1)
        s = string[one:]
        ones = [[1, 8, 9], [8, 16, 24], [1, 2, 3],
                [7, 8, 15], [1, 9, 10], [8, 9, 17], [1, 7, 8]]
        ans = {0: "A", 1: "B", 2: "C", 3: "D", 4: "E", 5: "F", 6: "G"}
        for k, o in enumerate(ones):
            if all([s[o[0]], s[o[1]], s[o[2]]]):
                print(ans[k])
        input()
    except:
        break
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

r = I()
if r<1200:
    print("ABC")
elif r<2800:
    print("ARC")
else:
    print("AGC")


### FIXED CODE ###

import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

r = k()
if r<1200:
    print("ABC")
elif r<2800:
    print("ARC")
else:
    print("AGC")
mark = []
for i in range(N):
    b = int(input())
    for j, a in enumerate(A):
        for k, aa in enumerate(a):
            if aa == b:
                mark.append((j,k))



if ( ((0,0) and (1,1) and (2,2)) or ((0,2) and (1,1) and (2,0)) ) in mark:
    print("Yes")
    exit()
else:
    for i in range(3):
        if ((i,0) and (i,1) and (i,2)) in mark:
            print('Yes')
            exit()
        if ((0,i) and (1,i) and (2,i)) in mark:
            print("Yes")
            exit()

print("No")

### FIXED CODE ###


A = [list(map(int, input().split())) for i in range(3)]
N = int(input())

mark = [[0]*3, [0]*3, [0]*3]

for i in range(N):
    b = int(input())
    for j, a in enumerate(A):
        for k, aa in enumerate(a):
            if aa == b:
                mark[j][k] = 1


if mark[0][0] == mark[1][1] == mark[2][2] == 1 or  mark[0][2] == mark[1][1] == mark[2][0] == 1:
    print("Yes")
    exit()
else:
    for i in range(3):
        if mark[i][0] == mark[i][1] == mark[i][2] == 1:
            print('Yes')
            exit()
        if mark[0][i] == mark[1][i] == mark[2][i] == 1:
            print("Yes")
            exit()

print("No")
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2 == 0 for i in a):
    a = [i % 2 for i in  a]
    cnt += 1
print(cnt)


### FIXED CODE ###

print(input().count("1"))
n=int(input())
ans=set([])
for i in range(n):
    a=int(input())
    if a in ans:
        ans.remove(a)
    else:
        ans.append(a)
print(len(ans))


### FIXED CODE ###

n=int(input())
ans=set([])
for i in range(n):
    a=int(input())
    if a in ans:
        ans.remove(a)
    else:
        ans.add(a)
print(len(ans))
M = map(int, input().split())
X = 24 + (24-M)
print(X)


### FIXED CODE ###

M = int(input())
X = 24 + (24-M)
print(X)
A,B = map(int, input().split())
print('Alice' if cards.index(A) > cards.index(B) else 'Bob' if cards.index(A) < cards.index(B) else 'Draw' )

### FIXED CODE ###

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

if A == 1:
    A = 14
if B == 1:
    B = 14

if A > B:
    print('Alice')
elif A == B:
    print('Draw')
else:
    print('Bob')
import math
import itertools
import heapq
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect, bisect_left, bisect_right
from collections import defaultdict, deque


# d = defaultdict(lambda: 0)
# setrecursionlimit(10**7)
# inf = float("inf")


##### stdin ####
def LM(t, r): return list(map(t, r))
def R(): return stdin.readline()
def RS(): return R().split()
def I(): return int(R())
def F(): return float(R())
def LI(): return LM(int,RS())
def LF(): return LM(float,RS())
def ONE_SL(): return list(input())
def ONE_IL(): return LM(int, ONE_SL())
def ALL_IL(): return LM(int,stdin)

##### tools #####
def ap(f): return f.append
def pll(li): print('\n'.join(LM(str,li)))
def pljoin(li, s): print(s.join(li))



##### main #####

def main():
	n = I()
	a = LI()
	b = LI()

	for i in range(n-1):
		diff = a[i]-b[i]

		if diff == 0:
			pass

		elif diff>0:
			b[i] += diff
			a[i+1] += 2*diff

		elif diff<0:
			if diff%2:
				a[i] += abs(diff)+1
				b[i+1] += (abs(diff)+1)//2
				a[i+1] += 2
				b[i] += 1
			else:
				a[i] += abs(diff)
				b[i+1] += abs(diff)//2
		print(a)
		print(b)
		print("-"*10)

	print(a)
	print(b)
	print("-"*10)


	if a[-1]<=b[-1]:
		print("Yes")
	else:
		print("No")

if __name__ == '__main__':
  main()

### FIXED CODE ###

import math
import itertools
import heapq
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect, bisect_left, bisect_right
from collections import defaultdict, deque


# d = defaultdict(lambda: 0)
# setrecursionlimit(10**7)
# inf = float("inf")


##### stdin ####
def LM(t, r): return list(map(t, r))
def R(): return stdin.readline()
def RS(): return R().split()
def I(): return int(R())
def F(): return float(R())
def LI(): return LM(int,RS())
def LF(): return LM(float,RS())
def ONE_SL(): return list(input())
def ONE_IL(): return LM(int, ONE_SL())
def ALL_IL(): return LM(int,stdin)

##### tools #####
def ap(f): return f.append
def pll(li): print('\n'.join(LM(str,li)))
def pljoin(li, s): print(s.join(li))



##### main #####
def main():
	n = I()
	x = 0; y = 0
	
	for a,b in zip(LI(),LI()):
		if a > b:
			x += a-b
		else:
			y += (b-a)//2

	print('Yes' if y >= x else "No")

if __name__ == '__main__':
  main()
def round_up(n: int) -> int:
    if n%10 != 0:
        return n + 10 - (n%10)
    else:
        return n

def round_up_count(n: int) -> int:
    if n%10 != 0:
        return 10 - n%10
    else:
        return 0

orders = []

max_rc: int = 0
last_order_index: int = 0
last_order_time: int = 0

for i in range(5):
    order = int(input())
    orders.append(order)
    last_order_time += round_up(order)
    rc = round_up_count(order)
    if max_rc <= rc:
        last_order_index = i
        max_rc = rc

print(last_order_time - round_up_count(orders[last_order_index]))

### FIXED CODE ###

def round_up(n):
    if n%10 != 0:
        return n + 10 - (n%10)
    else:
        return n

def round_up_count(n):
    if n%10 != 0:
        return 10 - n%10
    else:
        return 0

orders = []

max_rc = 0
last_order_index = 0
last_order_time = 0

for i in range(5):
    order = int(input())
    orders.append(order)
    last_order_time += round_up(order)
    rc = round_up_count(order)
    if max_rc <= rc:
        last_order_index = i
        max_rc = rc

print(last_order_time - round_up_count(orders[last_order_index]))
in = input()
str = list(in)

bef = str[0]
for i in range(3):
  if bef != str[i]:
    print("Yes")
    exit()
print("No")

### FIXED CODE ###

s = input()
str = list(s)
 
ca = str.count("A")
cb = str.count("B")
 
if ca == 3 or cb == 3:
  print("No")
else:
  print("Yes")
n, m = map(int, input().split())
a = list(map(int, input().split()))
select = 0
a.sort(reverse=True)
for i in range(m+1):
    if a[i]/sum(a) > 1/(4*m):
        select = 1
    else:
        select = 0

if select == 1:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
select = 0
a.sort(reverse=True)
for i in range(m):
    if a[i]/sum(a) >= 1/(4*m):
        select = 1
    else:
        select = 0

if select == 1:
    print('Yes')
else:
    print('No')