#include <bits/stdc++.h>
using namespace std;
struct Node {
  map<string, int> folder, file;
  string name;
};
vector<Node> tree;
string s;
int Sch = 4;
void Build(int root) {
  int k = s.find('\\');
  if (k == -1) {
    tree[root].file.insert(make_pair(s, 1));
  } else {
    string nf = s.substr(0, k);
    s.erase(0, k + 1);
    if (tree[root].folder.find(nf) == tree[root].folder.end()) {
      Sch++;
      tree[Sch].name = nf;
      tree[root].folder.insert(make_pair(nf, Sch));
      Build(Sch);
    } else
      Build(tree[root].folder[nf]);
  }
}
int tresfol = 0;
int tresfile = 0;
int resfol = 0;
int resfile = 0;
void r(int root) {
  map<string, int>::iterator it;
  resfol += tree[root].folder.size();
  resfile += tree[root].file.size();
  for (it = tree[root].folder.begin(); it != tree[root].folder.end(); it++) {
    r(it->second);
  }
}
int main() {
  tree.resize(30000);
  int root;
  while (cin >> s) {
    root = int(s[0] - 'A' - 2);
    s.erase(0, 3);
    Build(root);
  }
  for (int i = 0; i < 5; ++i) {
    map<string, int>::iterator it;
    for (it = tree[i].folder.begin(); it != tree[i].folder.end(); it++) {
      r(it->second);
      if (tresfol < resfol) tresfol = resfol;
      if (tresfile < resfile) tresfile = resfile;
      resfile = resfol = 0;
    }
  }
  cout << tresfol << ' ' << tresfile;
  return 0;
}
