Guest
Login
跳过导航链接

Super's triangle II
Time Limit:1000MS  Memory Limit:32768K

Description:

After superman managed to solve the problem whether several sticks can form a triangle, now he thinks of a more advanced problem whether some sticks can form an equilateral triangle (None of them can be bended).

Input:

Given an integer n (3<=n<=30), which means the total number of sticks (Number 0 indicates the end of input). And n integers followed by mean the different length of such sticks(1<=len[i]<=100).

Output:

If such sticks can form an equilateral triangle (All of them should be used), please print “Yes”, or print the word “No”.

Sample Input:

3 100 100 100 
4 10 10 10 20
0

Sample Output:

Yes
No

Hint:

It is not guaranteed that given sticks can form a triangle, saying nothing of an equilateral triangle.
Status  Submit


Zhe Jiang University Of Technology Online Programming Space Beta1.3
Designed & Developped By Jin Qiwei
 All Copyright Reserved 2006
703