#!/usr/bin/env python

from __future__ import division
import sys

def main():
    err = 0
    tot = 0
    for line in sys.stdin:
        ws = line.split()
        if len(ws) > 0:
            a, b = ws
            if a != b:
                err += 1
            tot += 1
    print "%5d %8d %.6f" % (err, tot, err/tot)

if __name__ == '__main__':
    main()
