using System;

class main {
  static void Main(){
    string str;
    while(true){
      str = Console.ReadLine();
      if(str == null) break;
      string[] strs = str.Split();
      Console.Write(strs[0].Length);
      Console.WriteLine(" " + strs[1].Length);
    }
  }
}
