import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
String line=null;
do{
line=scanner.nextLine();
int index1=line.indexOf(',');
int a=Integer.parseInt(line.substring(0, index1));
int index2=line.indexOf(',', index1+1);
int b=Integer.parseInt(line.substring(index1+1,index2));
int c=Integer.parseInt(line.substring(index2+1));
judge(a,b,c);
}while(line!=null);
scanner.close();
}
public static void judge(int a,int b,int c){
if(a==b&&b==c){
System.out.println("等边三角形");
}else if(a+b>c&&a+c>b&&b+c>a){
if(a==b||a==c||b==c){
System.out.println("等腰三角形");
}else{
System.out.println("普通三角形");
}
}else{
System.out.println("非法");
}
}
}