#include <bits/stdc++.h>
using namespace std;
map<string, int> subfold, file;
string str;
int cnt, i, flag, ans1, ans2;
int main(void) {
  ans1 = ans2 = -1;
  while (cin >> str) {
    cnt = 0;
    while (1) {
      i = str.find_last_of('\\');
      if (i == 2) break;
      str = str.substr(0, i);
      flag = file[str];
      subfold[str] += cnt;
      file[str]++;
      if (!flag) cnt++;
      ans1 = max(ans1, subfold[str]);
      ans2 = max(ans2, file[str]);
    }
  }
  cout << ans1 << " " << ans2 << '\n';
  return 0;
}
