import java.util.Scanner; public class No495 { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); StringBuilder str = new StringBuilder(stdin.next()); stdin.close(); long left = 0, right = 0; while (str.length() != 1) { if (str.charAt(1) == '^') { left++; } if (str.charAt(1) == '*') { right++; } str.delete(0, 5); } System.out.println(left + " " + right); } }