SP18246 IITWPC4C - Maggu and Vectors

Description

Maggu was teaching vectors using triangle diagrams to to his little brother. Now in the midst of lesson he went for a coffee and on returning finds all his triangles disassembled into constituent vectors by his naughty brother. He needs to recreate the triangles. He needs your help in doing this task quickly as he has to go for an internship interview.

Input Format

First line will contain T (1

Output Format

You have to print, in a new line for every test case, “YES” if any 3 vectors among N form a triangle, “NO” otherwise.