#include <bits/stdc++.h>
using namespace std;
int l, folder, file;
map<string, int> m;
map<int, bool> isfile;
vector<set<int> > g;
pair<int, int> memo[10000];
pair<int, int> rec(int c) {
  if (memo[c] != make_pair(-1, -1)) return memo[c];
  int fo = 0, fi = 0;
  if (isfile[c])
    fi = 1;
  else
    fo = 1;
  for (__typeof((g[c]).begin()) i = (g[c]).begin(); i != (g[c]).end(); i++) {
    pair<int, int> p = rec(*i);
    fo += p.first;
    fi += p.second;
  }
  folder = max(folder, fo);
  file = max(file, fi);
  return memo[c] = make_pair(fo, fi);
}
void run() {
  l = 0;
  m.clear();
  isfile.clear();
  g.clear();
  g.resize(10000);
  string s, t;
  while (cin >> s) {
    t = s.substr(2);
    s = s.substr(0, 2);
    for (int i = 0; i < t.size(); i++)
      if (t[i] == '\\') t[i] = ' ';
    stringstream ss(t);
    int parent = -1;
    while (ss >> t) {
      s += "\\" + t;
      if (!m.count(s)) m[s] = l++;
      if (parent >= 0) g[parent].insert(m[s]);
      if (t.find(".") != t.npos) isfile[m[s]] = 1;
      parent = m[s];
    }
  }
  for (int i = 0; i < l; i++) memo[i] = make_pair(-1, -1);
  folder = file = 0;
  for (int i = 0; i < l; i++)
    if (memo[i] == make_pair(-1, -1)) rec(i);
  cout << folder - 1 << " " << file << endl;
}
int main() {
  run();
  return 0;
}
