{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003eMathematician Ramanujan didn’t have any close friends. Someone asked him the reason. He replied that although he wanted to have close friends but nobody was up to his expectation. When pressed how he expected his friends to be, he replied like numbers 220 and 284. The person got confused and asked what the connection between friendship and these numbers is !\u003c/p\u003e\r\n\u003cp\u003eRamanujan asked him to find the divisors of each number! With much difficulty the person derived and listed them.\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e220 : 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110, 220\u003c/li\u003e\r\n\u003cli\u003e284 : 1, 2, 4, 71, 142, 284\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003eRamanujan then asked the person to exclude the numbers 220 and 284 and asked the sum of the remaining divisors. The person was astonished to find:\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e220 - 1+2+4+5+10+11+20+22+44+55+110 \u003d 284\u003c/li\u003e\r\n\u003cli\u003e284 - 1+2+4+71+142 \u003d 220\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003eRamanujan explained that an ideal friendship should be like these numbers to complement each other even when one is absent the other should represent the friend !\u003c/p\u003e\r\n\u003cp\u003eAs you’re a talented programmer you should be able to find ideal friendship between two numbers.\u003c/p\u003e\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eThe first line of input will contain a positive integer \u003cstrong\u003eT\u003c/strong\u003e (T \u0026lt;\u003d 50), denoting the number of test cases.\u003c/p\u003e\r\n\u003cp\u003eIn each test case, there will be two integer \u003cstrong\u003eX\u003c/strong\u003e and \u003cstrong\u003eY\u003c/strong\u003e (10 \u0026lt; X, Y \u0026lt;\u003d 10^6)\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003eIf ideal friendship exists between two numbers then print \"\u003ctt\u003eFriendship is ideal\u003c/tt\u003e\", if not print \"\u003ctt\u003eFriendship is not ideal\u003c/tt\u003e\".\u003c/p\u003e\r\n\u003ch3\u003eExample\u003c/h3\u003e\r\n\u003ch3\u003eExample\u003c/h3\u003e\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n220 284\r\n486 594\r\n1184 1210\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eFriendship is ideal\r\nFriendship is not ideal\r\nFriendship is ideal\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c/div\u003e"}}]}