{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eDuring the war in Erathia, an army of liches had to solve a difficult task of\r\nrelocating its troops.\r\nLiches can teleport from one city to another quickly enough,\r\nbut giving directions to thousands of liches in dozens of strongholds\r\nseems to be a real problem.\r\nThis problem was especially difficult when the Great lich Sandro\r\nwas powerful, as the army of liches grew huge.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eSandro noticed that only two of all the spells,\r\n\u003ci\u003eCurse of the Netherworld\u003c/i\u003e and \u003ci\u003eImplosion\u003c/i\u003e, are powerful enough.\r\nWhen somebody casts them, it can be felt everywhere in the country.\r\nHe decided to use these spells as signals to his troops.\r\nWhen liches in a certain stronghold feel a certain spell,\r\nthey should teleport to the predefined destination stronghold\r\n(or stay in their current stronghold).\r\nAfter a spell is cast, the liches in all the strongholds\r\nsimultaneously teleport according to this scheme.\r\nLiches have no troubles with discipline,\r\nso this scheme works perfectly since it was introduced.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eWhen Sandro died, the peace between people and the undead was proclaimed.\r\nThe remaining liches were evenly distributed among all the strongholds\r\nin Deyja in case of a sudden attack, while the top undead commanders\r\nstarted to fight for power.\r\nSoon necromancer Vidomina and vampire Korbu became the most powerful\r\namong the undead.\r\nTheir influence was almost equal, so none of them could become the only\r\nleader, and the country was split between them.\r\nRecently, Vidomina decided to start another war against Erathia and began\r\nto gather troops.\r\nAs an experienced warlord, she understands the strength of Erathia\u0027s army,\r\nand now wants to gather all the troops in one stronghold prior to the attack.\r\nMeanwhile, Korbu thinks that this war can lead to total annihilation\r\nof the undead and wants to keep truce.\r\nHe can\u0027t convince Vidomina, so he decided to prevent her from\r\ngathering all the troops together.\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eCasting signal spells requires a lot of energy,\r\nso they can only be cast once a day.\r\nEach noon Vidomina casts one of the spells, in order to gather\r\nthe liches together.\r\nOn the other hand, each midnight Korbu also casts one of the spells,\r\ntrying to stop Vidomina.\r\nThere are no other mages capable of casting these spells in Deyja,\r\nso no one else can move the troops. Vidomina casts her spell first.\r\nAssuming that both mages act optimally, find out whether Vidomina\r\nsucceeds in gathering all the liches together.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains an integer \u003ci\u003en\u003c/i\u003e, the number of strongholds in Deyja\r\n(2 ≤ \u003ci\u003en\u003c/i\u003e ≤ 1000).\r\nThe \u003ci\u003ei\u003c/i\u003e-th of the following \u003ci\u003en\u003c/i\u003e lines contains two integers \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e and \u003ci\u003eb\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e\r\nwhich are the numbers of strongholds where troops move from stronghold \u003ci\u003ei\u003c/i\u003e\r\nafter \u003ci\u003eCurse of the Netherworld\u003c/i\u003e and \u003ci\u003eImplosion\u003c/i\u003e spells,\r\nrespectively (1 ≤ \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003eb\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ \u003ci\u003en\u003c/i\u003e).\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eOutput “War” if Vidomina will succeed in gathering all the troops together,\r\nor “Peace” if Korbu will prevent her from doing that in any finite number of\r\ndays.\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\u003e2\r\n2 1\r\n1 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003ePeace\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\u003ctable class\u003d\u0027vjudge_sample\u0027\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\u003e2\r\n2 2\r\n2 1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eWar\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}