#include <bits/stdc++.h>
using namespace std;
struct folder {
  int link[100];
  string name[100];
} arr[10000];
int kol = 5;
int files[10000];
void add(int x, string ss) {
  files[x]++;
  int i = ss.find('\\');
  if (i == -1) return;
  string cur = ss.substr(0, i);
  ss = ss.substr(i + 1);
  for (int i = 0; i < 100; i++) {
    if (!arr[x].link[i]) {
      arr[x].name[i] = cur;
      arr[x].link[i] = kol++;
    }
    if (arr[x].name[i] == cur) {
      add(arr[x].link[i], ss);
      break;
    }
  }
}
int dfs(int x) {
  int t = 1;
  for (int i = 0; i < 100; i++)
    if (arr[x].link[i]) t += dfs(arr[x].link[i]);
  return t;
}
void add_rooted(string s) { add(s[0] - 'C', s.substr(3)); }
int main() {
  string s;
  while (cin >> s) {
    add_rooted(s);
  }
  int fls = 0, fldrs = 0;
  for (int i = 5; i < kol; i++) {
    fls = max(fls, files[i]);
    fldrs = max(fldrs, dfs(i));
  }
  printf("%d %d", fldrs - 1, fls);
  return 0;
}
