import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split( " " );
        int n = Integer.parseInt( params[0] );
        int m = Integer.parseInt( params[1] );

        boolean[] acs = new boolean[n];
        int[] was = new int[n];
        int acCount = 0;
        int waCount = 0;

        for( int i = 0 ; i < m ; i++ ){

            params = in.nextLine().split( " " );
            int number = Integer.parseInt( params[0] );
            String result = params[1];

            if( !acs[number-1] ){
                if( "WA".equals( result ) ){
                    was[number-1]++;
                }
                if( "AC".equals( result ) ){
                    acs[number-1] = true;
                    acCount++;
                    waCount += was[number-1];
                }
            }

        }

        System.out.println( "" + acCount + " " + waCount );

    }

}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz