{"raw_statement":[{"iden":"statement","content":"Coaches Aram, Lucca, and David couldn't agree on who should order pizza. To avoid a fight in real life, they decided to battle in a video game while everyone else starves.\n\nIn this game, there are many fighters to choose from. Each fighter has a name and three integer _stats_ HP, AT, DF: the fighters' starting health points, attack strength and defence armour. One-on-one combat between Fighters $A$ and $B$ progresses in a series of rounds. In each round, Fighter $A$'s HP decreases by $max (0, \"AT\"_B -\"DF\"_A)$, while Fighter $B$'s HP _simultaneously_ decreases by $max (0, \"AT\"_A -\"DF\"_B)$. A fighter wins if, at the end of some round, their HP is positive while their opponent's HP is not. If this situation never occurs, the fight is ruled a draw with no winner.\n\nAram, Lucca, and David want a free-for-all. They decided that it would only be fun if they choose three fighters that form an _intransitive triple_. $A$, $B$ and $C$ are said to form an _intransitive triple_ if, in one-on-one combat, $A$ would win against $B$, $B$ would win against $C$, and $C$ would win against $A$. \n\nCan you find all intransitive triples that Aram, Lucca, and David can choose from?\n\nOn the first line is a single integer $N$ $(1 <= N <= 100)$, the number of fighters.\n\nOn each of the next $N$ lines is a name consisting of 1 to 15 upper or lower case Latin letters, followed by three space-separated integers HP, AT and DF ($1 <= \"HP\", \"AT\", \"DF\"<= 10 thin 000$) denoting the health points, attack strength, and defence armour for that fighter.\n\nThe names of all the fighters are distinct from one another.\n\nOutput on the first line a single integer K, the number of intransitive triples.\n\nOn each of the next $K$ lines, output the names of three intransitive fighters separated by spaces. No two lines should describe the same set of fighters. Any ordering of intransitive triples, and of fighter names within an intransitive triple, will be accepted.\n\n"},{"iden":"input","content":"On the first line is a single integer $N$ $(1 <= N <= 100)$, the number of fighters.On each of the next $N$ lines is a name consisting of 1 to 15 upper or lower case Latin letters, followed by three space-separated integers HP, AT and DF ($1 <= \"HP\", \"AT\", \"DF\"<= 10 thin 000$) denoting the health points, attack strength, and defence armour for that fighter.The names of all the fighters are distinct from one another."},{"iden":"output","content":"Output on the first line a single integer K, the number of intransitive triples.On each of the next $K$ lines, output the names of three intransitive fighters separated by spaces. No two lines should describe the same set of fighters. Any ordering of intransitive triples, and of fighter names within an intransitive triple, will be accepted."},{"iden":"examples","content":"Input5\nTheStrong 90 60 10\nTheInvincible 10000 10000 10000\nTheTough 70 50 25\nTheBrick 3 1 4159\nTheResilient 160 40 10\nOutput1\nTheResilient TheStrong TheTough \nInput1\nTheLonely 500 500 500\nOutput0\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ K \\in \\mathbb{Z}^+ $, $ K \\leq 10^9 $.  \nLet $ A \\in \\mathbb{Z}^+ $ be a positive integer such that both $ A $ and $ A + K $ have an odd number of positive divisors.\n\n**Constraints**  \n1. $ A > 0 $  \n2. $ A + K > 0 $  \n3. The number of positive divisors of $ A $ is odd.  \n4. The number of positive divisors of $ A + K $ is odd.\n\n**Objective**  \nFind all $ A \\in \\mathbb{Z}^+ $ such that both $ A $ and $ A + K $ are perfect squares.  \n\n(Note: A positive integer has an odd number of positive divisors if and only if it is a perfect square.)","simple_statement":"A number has an odd number of positive divisors if and only if it is a perfect square.\n\nGiven K, find all perfect squares A such that A + K is also a perfect square.\n\nPrint the count of such A, and if any, list them in ascending order.","has_page_source":false}