object Main{
  def main(args: Array[String]){
    var tc = 0
    var hc = 0

    while(true){
      val in = scala.io.StdIn.readLine.split(",").map(_.toInt)

      println(in(0) + " " + in(1) + " " + in(2))

      if(scala.math.pow(in(0),2.0) + scala.math.pow(in(1),2.0) == scala.math.pow(in(2),2.0)){
        tc = tc + 1
      }
      else if(in(0) == in(1)){
        hc = hc + 1
      }

      println(tc + " " + hc)
    }
  }
}