Reach Home | starter 82 | codechef solution

Chef is hungry and wants to reach home.

Chef can travel up to 55 kilometres on 11 litre of fuel on his motorcycle.
Currently, his motorcycle is filled with �X litres of fuel and his home is �Y kilometres away.

Determine whether Chef can reach his home on his motorcycle or not.

Input Format

  • The first line of input will contain a single integer �T, denoting the number of test cases.
  • The first and only line of each test case contains two space-separated integers �X and �Y — the amount of fuel in Chef’s motorcycle and the distance to Chef’s home in kilometres.

Output Format

For each test case, output YES, if Chef can reach home on his motorcycle. Otherwise output NO.

You can output each character of the answer in uppercase or lowercase. For example, the strings yEsyesYes, and YES are considered the same.

Constraints

  • 1≤�≤1001≤T≤100
  • 1≤�,�≤10001≤X,Y≤1000

Sample 1:

Input

Output

4
2 10
3 17
4 2
6 45
YES
NO
YES
NO

Explanation:

Test case 11: With 22 litres of fuel, Chef can go up to 1010 kilometres. Since his home is 1010 kilometres away, he can reach his home on his motorcycle.

Test case 22: With 33 litres of fuel, Chef can go up to 1515 kilometres. Since his home is 1717 kilometres away, he cannot reach his home on his motorcycle.

Test case 33: With 44 litres of fuel, Chef can go up to 2020 kilometres. Since his home is 22 kilometres away, he can reach his home on his motorcycle.

Test case 44: With 66 litres of fuel, Chef can go up to 3030 kilometres. Since his home is 4545 kilometres away, he cannot reach his home on his motorcycle.

Click on below image to get the solution link:

Leave a Reply

Your email address will not be published. Required fields are marked *

मिर्जापुर 3 के बोनस एपिसोड में मुन्ना भैया की वापसी? आपकी साँसे थम जाएंगी! ये है आपके PAN CARD की एक्सपायरी डेट, कहीं छूट तो नहीं गई? यकीन नहीं मानोगे! ये 9 जगहें हैं UP में जो ताजमहल को भी फीका कर देंगी! मेरठ: इतिहास, धर्म और खूबसूरती का संगम! घूमने के लिए ये हैं बेहतरीन जगहें रोज आंवला खाने के 10 धांसू फायदे जो आपको कर देंगे हेल्दी और फिट! Anjali Arora to play Maa Sita: रामायण फिल्म में सीता का रोल निभाएंगी अंजली अरोड़ा, तैयारियों में लगी?