|
||||||||||
Don't be angryTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 794 Accepted Submission(s): 413 Problem Description Wiskey buys a cake and wants to eat with Michelle. The cake is very delicious with many chocolates on it. The cake is big; Wiskey need cut it to 6 pieces. Michelle is a perfectionist and she sets perfect standard for Wiskey that each piece must contains the same weight of chocolates. At first the cake may be not perfect, so Wiskey get some chocolate sticks, but the chocolate stick is too long, it will occupy adjacent two pieces and add same weight on the adjacent two pieces. You can assume Wiskey have infinite various weight chocolate sticks. Quick, Help Wiskey! Michelle is beginning to be angry. Input First line will contain one integer means how many cases will be follow. Each line will contain six integers means the weight of chocolates at first. All integers range in signed 32 bits. Output Print "YES" if Wiskey could finish the task. Else print "NO", and then you could visit Wiskey in hospital. Sample Input
Sample Output
Author Wiskey | ||||||||||
|