#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dx[] = {-1, 0, 1, 0};
long long dy[] = {0, -1, 0, 1};
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  map<string, set<string>> mp1;
  map<string, long long> mp2;
  string s;
  while (cin >> s) {
    long long i = 0;
    while (s[i] != '\\') i++;
    i++;
    while (s[i] != '\\') i++;
    string dir = s.substr(0, i);
    string x = s.substr(i);
    for (long long i = x.size() - 1; i >= 0; i--)
      if (x[i] == '\\') {
        x = x.substr(0, i);
        break;
      }
    mp2[dir]++;
    x.push_back('\\');
    for (long long i = 0; i < x.size(); i++)
      if (x[i] == '\\') {
        string y = x.substr(0, i);
        if (!y.empty()) mp1[dir].insert(y);
      }
  }
  long long ans1 = 0, ans2 = 0;
  for (auto i : mp1) {
    ans1 = max(ans1, (long long)i.second.size());
  }
  for (auto i : mp2) ans2 = max(ans2, i.second);
  cout << ans1 << " " << ans2 << "\n";
}
