import scala.io.Source.stdin

object Main {
  def main(args:Array[String]) =  {
    val (r,l) = stdin.getLines.foldLeft((0,0)){ (x,y) =>
      val z = y.split(",").map(_.toInt)
      if(z(0)==z(1)) (x._1,x._2+1)
      else if(z(0)*z(0)+z(1)*z(1)==z(2)*z(2)) (x._1+1,x._2)
      else x
    }
    println(r)
    println(l)
  }
}