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

    while(true){
      val in = new java.util.Scanner(System.in)
      var a = in.nextInt
      var b = in.nextInt
      var c = in.nextInt

      if(scala.math.pow(a,2.0) + scala.math.pow(b,2.0) == scala.math.pow(c,2.0)){
        tc = tc + 1
      }
      else if(a == b){
        hc = hc + 1
      }

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