import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.solve();
        m.show();
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int N;
    int M;
    int[] p;
    int[] AC;
    int[] WA;
    int countAC = 0;;
    int countWA = 0;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        this.N = sc.nextInt();
        this.M = sc.nextInt();
        p = new int[M];
        AC = new int[N];
        WA = new int[N];
    }
    
    //解答処理
    private void solve() {
        
    	for (int i=0 ;i<M; i++) {
    		p[i] = sc.nextInt();
    		String S = sc.next();
    		if (S.equals("WA")) {
    			WA[p[i]-1]++;
    		} else {
    			//まだその問題でACが出てないとき、ペナルティ分を加算
    			if (AC[p[i]-1] == 0) {
    				countWA += WA[p[i]-1];
    			}
    			AC[p[i]-1] = 1;
    		}
    	}
    	
    	for (int i=0; i<N; i++) {
    		countAC += AC[i];
    	}
        
    }
    
    //出力
    public void show() {
        System.out.print(countAC);
        System.out.print(" ");
        System.out.print(countWA);
    }

}

/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