The Duck song

For simplicity, we'll assume that there are only three types of grapes: green grapes, purple grapes and black grapes.

Andrew, Dmitry and Michal are all grapes' lovers, however their preferences of grapes are different. To make all of them happy, the following should happen: Andrew, Dmitry and Michal should eat at least $x$, $y$ and $z$ grapes, respectively. Andrew has an extreme affinity for green grapes, thus he will eat green grapes and green grapes only. On the other hand, Dmitry is not a fan of black grapes — any types of grapes except black would do for him. In other words, Dmitry can eat green and purple grapes. Michal has a common taste — he enjoys grapes in general and will be pleased with any types of grapes, as long as the quantity is sufficient.

Knowing that his friends are so fond of grapes, Aki decided to host a grape party with them. He has prepared a box with $a$ green grapes, $b$ purple grapes and $c$ black grapes.

However, Aki isn't sure if the box he prepared contains enough grapes to make everyone happy. Can you please find out whether it's possible to distribute grapes so that everyone is happy or Aki has to buy some more grapes?

It is not required to distribute all the grapes, so it's possible that some of them will remain unused.


-----Input-----

The first line contains three integers $x$, $y$ and $z$ ($1 \le x, y, z \le 10^5$) — the number of grapes Andrew, Dmitry and Michal want to eat.

The second line contains three integers $a$, $b$, $c$ ($1 \le a, b, c \le 10^5$) — the number of green, purple and black grapes in the box.


-----Output-----

If there is a grape distribution that allows everyone to be happy, print "YES", otherwise print "NO".


-----Examples-----
Input
1 6 2
4 3 3

Output
YES

Input
5 1 1
4 3 2

Output
NO



-----Note-----

In the first example, there is only one possible distribution:

Andrew should take $1$ green grape, Dmitry should take $3$ remaining green grapes and $3$ purple grapes, and Michal will take $2$ out of $3$ available black grapes.

In the second test, there is no possible distribution, since Andrew is not be able to eat enough green grapes. :(

Difficulty: interview

Starter code:

Solutions:
x,y,z = list(map(int,input().split()))
a,b,c = list(map(int,input().split()))
if a < x:
    print("NO")
    return
x -= a
y += x
if b < y:
    print("NO")
    return
y -= b
z += y
if c < z:
    print("NO")
    return
print("YES")    


x, y, z= map(int, input().split())
a, b, c = map(int,input().split())
if a >= x:
    a -= x
    s = a + b
    if s >= y:
        s -= y
        s += c
        if s >= z:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:
    print("NO")

x, y, z = list(map(int, input().split()))
a, b, c = list(map(int, input().split()))
a -= x
if a < 0:
	print("NO")
	return
if a + b < y:
	print("NO")
	return
if a + b + c - y < z:
	print("NO")
	return
print("YES")


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

f = a
s = a + b
t = a + c + b

f -= x
s = s - x - y
t = t - x - y - z

if f < 0 or s < 0 or t < 0:
    print('NO')
else:
    print('YES')

import math as mt
import itertools as it
import functools as ft
import random as rnd

stdin = lambda type_ = "int", sep = " ": list(map(eval(type_), input().split(sep)))
joint = lambda sep = " ", *args: sep.join(str(i) if type(i) != list else sep.join(map(str, i)) for i in args)

x, y, z = stdin()
a, b, c = stdin()

a -= x

if a < 0:
    print("NO")
    return

if a + b < y:
    print("NO")
    return

if a + b + c < y + z:
    print("NO")
    return

print("YES")

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

if x > a:
    print('NO')
else:
    a -= x
    if a + b >= y and a + b + c >= y + z:
        print('YES')
    else:
        print('NO')


# coding: utf-8

import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(list(range(len(l))), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: list(map(int, input().split()))
MIL = lambda: list(MI())
MIS = lambda: input().split()


def main():
    x, y, z = MI()
    a, b, c = MI()
    return a >= x and a + b >= x + y and a + b + c >= x + y + z


def __starting_point():
    YESNO(main())

__starting_point()

x,y,z=map(int,input().split())
a,b,c=map(int,input().split())
if x>a or ((a+b)-x)<y or ((a+b+c)-x-y)<z:
	print("NO")
else:
	print("YES")

a,b,c=list(map(int,input().split()))
d,e,f=list(map(int,input().split()))
if a>d or a+b>d+e or a+b+c>d+e+f:
    print('NO')
else:
    print('YES')


x, y, z = list(map(int, input().split()))
a, b, c = list(map(int, input().split()))
if a >= x and a+b >= x+y and a+b+c >= x+y+z:
    print("YES")
else:
    print("NO")


x, y, z = map(int, input().split())
a, b, c = map(int, input().split())
if a >= x:
    if a + b - y - x >= 0:
        if a + b + c - x - y - z >= 0:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:
    print("NO")

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())

x, y, z = mi()
a, b, c = mi()
ok = 0
if a >= x:
    a -= x
    if a + b >= y:
        if a + b - y + c >= z:
            ok = 1
print('YES' if ok else 'NO')

x,y,z=[int(k) for k in input().split(" ")]
a,b,c=[int(k) for k in input().split(" ")]


if a>=x and a+b>=x+y and a+b+c>=x+y+z:
    print("YES")
else:
    print("NO")


x, y, z=map(int, input().split())
a, b, c=map(int, input().split())
if a+b+c<x+y+z:
    print("NO")
    quit()
if a<x:
    print("NO")
    quit()
a-=x
if a+b<y:
    print("NO")
    quit()
print("YES")

x, y, z = list(map(int, input().split()))
a, b, c = list(map(int, input().split()))
if a >= x:
    a -= x
    d = min(y, a)
    a -= d
    y -= d
    if (b >= y):
        b -= y
        if a + b + c >= z:
            print("YES")
        else:
            print("NO")
    else:
        print("NO")
else:
    print("NO")


x, y, z = list(map(int, input().split()))
zz, f, ch = list(map(int, input().split()))
zz -= x
if zz < 0:
	print('NO')
	return
k = zz + f
k -= y
if k < 0:
	print('NO')
	return
k += ch
if k - z < 0:
	print('NO')
	return
print('YES')


a,b,c=list(map(int,input().split()))
g,q,y=list(map(int,input().split()))
g-=a
if g>=0:
	q-=b-g
	if q>=0:
		y-=c-q
		if y>=0:
			print("YES")
		else:
			print("NO")
	else:
		print("NO")
else:
	print("NO")
			


x, y, z = [int(x) for x in input().split()]
a, b, c = [int(x) for x in input().split()]
if a < x:
    print("NO")
    return
a -= x
b += a
if b < y:
    print("NO")
    return
b -= y
c += b
if c < z:
    print("NO")
    return
print("YES")

def __starting_point():
    x, y, z = (int(x) for x in input().split())
    a, b, c = (int(x) for x in input().split())

    if a < x:
        print('NO')
        quit()
    if a + b - x < y:
        print('NO')
        quit()
    if a + b + c - x - y < z:
        print('NO')
        quit()
    print('YES')
__starting_point()

import math,time

def main():
	x,y,z = list(map(int, input().split()))
	a,b,c = list(map(int, input().split()))
	if x>a:
		print("NO")
		return
	else:
		a -= x
		u = a+b
		if y>u:
			print("NO")
			return
		else:
			u -= y
			u += c
			if z>u:
				print("NO")
				return
			else:
				print("YES")

def __starting_point():
	start_time = time.time()
	main()
	#print("--- %s seconds ---" % (time.time() - start_time))


__starting_point()

x, y, z = map(int, input().split())
a, b, c = map(int, input().split())
res = True
if a >= x:
    a -= x
    if a + b >= y:
        if a + b + c - y >= z:
            res = True
        else:
            res = False
    else:
        res = False
else:
    res = False

print("YES" if res else "NO")

x, y, z = list(map(int, input().split()))
a, b, c = list(map(int, input().split()))
if a >= x:
    a -= x
    if a + b >= y:
        b += a - y
        if b + c >= z:
            print("YES")
            return
print("NO")


x,y,z=list(map(int,input().split()))
a,b,c=list(map(int,input().split()))
flag=0
if(a<x):
	print('NO')
	return
a-=x
if(a+b<y):
	print('NO')
	return
if(a+b+c-y<z):
	print('NO')
	return
print('YES')


x, y, z = map(int, input().split())
a, b, c = map(int, input().split())
bad = False
if a >= x and a + b >= x + y and a + b + c >= x + y + z:
	print('YES')
else:
	print('NO')

a = input().split()

x,y,z = list(map(int, a))

a, b, c = list(map(int, input().split()))
rem = 0
ans = 1
if x>a:
    ans = 0
else:
    a -= x



if y> a+b:
    ans = 0
else:
    rem = a+b+c - y

if rem<z and ans != 0:
    ans = 0

if ans == 0:
    print('NO')
else:
    print("YES")