for(i<-3 to 100){val s=i*i;for(j<-3 to 5000){val t=Math.sqrt(j*j+s);if(t==t.toInt.toDouble)println(i+" "+j+" "+t.toInt)}}