#include <bits/stdc++.h>
using namespace std;
struct folder {
  map<string, folder> fold;
  set<string> files;
  folder() {}
  void insert(queue<string> q) {
    string s = q.front();
    q.pop();
    if (q.empty())
      files.insert(s);
    else
      fold[s].insert(q);
  }
  int qfolders() {
    int f = fold.size();
    for (map<string, folder>::iterator it = fold.begin(); it != fold.end();
         it++)
      f += it->second.qfolders();
    return f;
  }
  int qfiles() {
    int f = files.size();
    for (map<string, folder>::iterator it = fold.begin(); it != fold.end();
         it++)
      f += it->second.qfiles();
    return f;
  }
};
char line[105];
int main() {
  folder otto;
  while (gets(line)) {
    string s = line;
    queue<string> q;
    int last = 0;
    for (int i = 0; i < (s.size()); i++) {
      if (s[i] == '\\') {
        q.push(s.substr(last, i - last + 1));
        last = i;
      } else if (i == s.size() - 1)
        q.push(s.substr(last, i - last + 1));
    }
    otto.insert(q);
  }
  int ansfold = 0, ansfile = 0;
  for (map<string, folder>::iterator it = otto.fold.begin();
       it != otto.fold.end(); it++)
    for (map<string, folder>::iterator it2 = it->second.fold.begin();
         it2 != it->second.fold.end(); it2++) {
      ansfold = max(ansfold, it2->second.qfolders());
      ansfile = max(ansfile, it2->second.qfiles());
    }
  cout << ansfold << ' ' << ansfile << endl;
  return 0;
}
