题库练习 Magic Spheres
← 上一题 下一题 →

A10103 | Magic Spheres

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

Carl is a beginner magician. He has $a$ blue, $b$ violet and $c$ orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make a spell that has never been seen before, he needs at least $x$ blue, $y$ violet and $z$ orange spheres. Can he get them (possible, in multiple actions)?

输入格式

The first line of the input contains three integers $a$ , $b$ and $c$ ( $0<=a,b,c<=1000000$ ) — the number of blue, violet and orange spheres that are in the magician's disposal.

The second line of the input contains three integers, $x$ , $y$ and $z$ ( $0<=x,y,z<=1000000$ ) — the number of blue, violet and orange spheres that he needs to get.

输出格式

If the wizard is able to obtain the required numbers of spheres, print "Yes". Otherwise, print "No".

输入输出样例

输入 #1
4 4 0
2 1 2
输出 #1
Yes
输入 #2
5 6 1
2 7 2
输出 #2
No
输入 #3
3 3 3
2 2 2
输出 #3
Yes
C++ 编辑器
输入
输出