#include <bits/stdc++.h>
using namespace std;
map<string, set<string> > dirs[5];
map<string, int> files[5];
vector<string> a;
int main() {
  string line, s, acc, name;
  while (cin >> line) {
    int id = line[0] - 'C';
    line = line.substr(3);
    for (__typeof((line).begin()) i = ((line).begin()); i != (line).end(); ++i)
      if (*i == '\\') *i = ' ';
    istringstream iss(line);
    iss >> name;
    a.clear();
    while (iss >> s) a.push_back(s);
    a.pop_back();
    files[id][name]++;
    acc = "";
    for (__typeof((a).begin()) i = ((a).begin()); i != (a).end(); ++i) {
      acc += "/" + *i;
      dirs[id][name].insert(acc);
    }
  }
  int mx = 0;
  for (int i = 0; i < (5); ++i)
    for (__typeof((dirs[i]).begin()) j = ((dirs[i]).begin());
         j != (dirs[i]).end(); ++j)
      mx = (mx < ((int)(j->second).size())) ? ((int)(j->second).size()) : mx;
  cout << mx;
  mx = 0;
  for (int i = 0; i < (5); ++i)
    for (__typeof((files[i]).begin()) j = ((files[i]).begin());
         j != (files[i]).end(); ++j)
      mx = (mx < (j->second)) ? (j->second) : mx;
  cout << " " << mx << endl;
  return 0;
}
