ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests

2142. Magic

Time limit: 1.0 second
Memory limit: 256 MB
Did you ever dream of becoming a wizard? Or of being able to solve every problem of every contest?
Valya wanted to try out magic since childhood, so he became a programmer. One time he fell asleep trying to solve a problem, and he saw some magical dreams.
In his dream, Valya owns A red lands, B blue lands and C blue-red lands. A red land gives him one red mana, a blue land — one blue mana, and a blue-red land gives him either one red or one blue mana (for each blue-red land Valya can decide whether he gets red or blue mana from this land). Valya wants to cast a spell that costs X red mana, Y blue mana, and additionally Z mana of any color. Casting this spell will help him to solve the problem he fell asleep to. Determine if Valya has enough mana to use the spell.


The first line contains three space-separated integers A, B and C — the number of red, blue and blue-red lands respectively (0 ≤ A, B, C ≤ 109).
The second line contains three space-separated integers X, Y and Z — amount of red mana, blue mana and additional mana of any color required to cast the spell (0 ≤ X, Y, Z ≤ 109).


If Valya is able to cast the spell, print “It is a kind of magic” (without quotes). Otherwise, print “There are no miracles in life” (without quotes).


3 3 1
2 2 1
It is a kind of magic
5 6 5
6 5 6
There are no miracles in life
Problem Author: Valentin Zuev