#include <bits/stdc++.h>
using namespace std;
set<string> S;
string line[1010], a[1010], s;
int n = 0, ans = 0, file = 0;
int main() {
  while (getline(cin, s)) line[++n] = s;
  for (int i = 1; i <= n; i++) {
    int cur = 0;
    a[i] = "";
    for (int j = 0; j < line[i].size(); j++) {
      a[i] += line[i][j];
      if (line[i][j] == '\\') cur++;
      if (cur == 2) break;
    }
  }
  for (int i = 1; i <= n; i++) {
    string fd = a[i];
    S.clear();
    int files = 0, F = 0;
    for (int j = 1; j <= n; j++)
      if (a[j] == fd) {
        files++;
        string v = "";
        int cur = 0;
        for (int k = 0; k < line[j].size(); k++) {
          v += line[j][k];
          if (line[j][k] == '\\') cur++;
          if (line[j][k] == '\\' && cur > 2)
            if (!S.count(v)) S.insert(v), F++;
        }
      }
    ans = max(ans, F);
    file = max(file, files);
  }
  cout << ans << " " << file << endl;
  return 0;
}
