import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    var (rectangle, diamond) = Pair(0, 0)
    while (sc.hasNext()) {
        val (a, b, c) = sc.next().split(",").map { Integer.parseInt(it) }
        if (a*a+b*b==c*c) rectangle++
        if (a==b) diamond++
    }
    println(rectangle)
    println(diamond)
}
