import java.util.Scanner; public class Easy { public static void main(String[] args) { Scanner s = new Scanner(System.in); StringBuilder str = new StringBuilder(s.nextLine()); s.close(); int l = 0,r = 0; while(str.length() != 1){ if(str.charAt(1) == '^'){ l++; }else{ r++; } str.delete(0, 5); } System.out.println(l + " " + r); } }