#include <bits/stdc++.h>
using namespace std;
vector<map<string, int> > edl(1);
vector<int> files, folders;
int dfsFiles(int v) {
  files[v] = 0;
  int ch = 0;
  for (map<string, int>::iterator i = edl[v].begin(); i != edl[v].end(); ++i) {
    files[v] += dfsFiles(i->second);
    ch++;
  }
  if (ch == 0) return 1;
  return files[v];
}
int dfsFolders(int v) {
  folders[v] = 0;
  int ch = 0;
  for (map<string, int>::iterator i = edl[v].begin(); i != edl[v].end(); ++i) {
    folders[v] += dfsFolders(i->second);
    ch++;
  }
  return folders[v] + (ch != 0);
}
int main() {
  edl.reserve(100);
  vector<string> names(1, ":");
  int verId = 1;
  char buf[102];
  while (gets(buf) != 0)
    if (strlen(buf) > 0) {
      string s = buf;
      int v = 0, p = 0;
      while (p < ((int)(s).size())) {
        string word;
        for (; p < ((int)(s).size()) && s[p] != '\\'; p++) word += s[p];
        p++;
        if (!edl[v].count(word)) {
          edl.push_back(map<string, int>());
          edl[v][word] = verId++;
          names.push_back(word);
        }
        v = edl[v][word];
      }
    }
  files.resize(verId, 0);
  folders.resize(verId, 0);
  dfsFiles(0);
  dfsFolders(0);
  int a = 0, b = 0;
  for (int i = 1; i < ((int)(names).size()); i++)
    if (names[i][((int)(names[i]).size()) - 1] != ':') a = max(a, files[i]);
  for (int i = 1; i < ((int)(names).size()); i++)
    if (names[i][((int)(names[i]).size()) - 1] != ':') b = max(b, folders[i]);
  printf("%d %d\n", b, a);
  return 0;
}
