#include <bits/stdc++.h>
using namespace std;
string s;
map<string, int> a, b;
int ansa, ansb;
int main() {
  while (cin >> s) {
    int sum = 0;
    for (;;) {
      int k = s.find_last_of('\\');
      if (k == 2) break;
      s = s.substr(0, k);
      int t = b[s];
      a[s] += sum;
      b[s]++;
      if (!t) sum++;
      ansa = max(ansa, a[s]);
      ansb = max(ansb, b[s]);
    }
  }
  cout << ansa << " " << ansb;
  return 0;
}
