import java.util.*; public class test { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int T[] = new int[N]; String S[] = new String[N]; int M[] = new int[N]; int sum1 = 0; int sum2 = 0; for(int i=0; i S[i].length()){ M[i] = S[i].length(); } sum1 += M[i]; sum2 += S[i].length(); } System.out.println(sum1 +" "+(sum2-sum1)); } }