#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
vector<string> files;
bool only[10010], isfolder[10010];
int ans1, ans2;
bool check(int a, int b) {
  if (files[a].size() > files[b].size()) return 0;
  for (int i = 0; i < files[a].size(); i++)
    if (files[a][i] != files[b][i]) return 0;
  return 1;
}
int main() {
  string in;
  while (cin >> in) {
    for (int i = 3; i < in.size(); i++) {
      if (in[i] == '\\') files.push_back(in.substr(0, i + 1));
    }
    files.push_back(in);
  }
  sort(files.begin(), files.end());
  for (int i = 0; i < files.size(); i++) {
    only[i] = 1;
    isfolder[i] = 1;
  }
  for (int i = 0; i < files.size() - 1; i++)
    if (files[i] == files[i + 1]) only[i + 1] = 0;
  for (int i = 0; i < files.size(); i++)
    for (int j = 0; j < files[i].size(); j++)
      if (files[i][j] == '.') isfolder[i] = 0;
  for (int i = 0; i < files.size(); i++) {
    int lb = i, ub = files.size(), mid;
    while (lb < ub - 1) {
      mid = (lb + ub) / 2;
      if (check(i, mid))
        lb = mid;
      else
        ub = mid;
    }
    int mx1 = 0, mx2 = 0;
    for (int j = i + 1; j <= lb; j++) {
      if (only[j] && isfolder[j]) mx1++;
      if (only[j] && !isfolder[j]) mx2++;
    }
    ans1 = max(ans1, mx1);
    ans2 = max(ans2, mx2);
  }
  cout << ans1 << " " << ans2 << endl;
  return 0;
}
