#include <bits/stdc++.h>
using namespace std;
set<string> S, Fo;
map<string, set<string> > File, Folder;
set<string> g;
void B(string s) {
  vector<string> V;
  string t = "";
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == (char)92) {
      t.push_back(s[i]);
      V.push_back(t);
    } else {
      t.push_back(s[i]);
    }
  }
  V.push_back(t);
  S.insert(V[0]);
  for (int i = 1; i < V.size() - 1; i++) {
    if (Fo.find(V[i]) == Fo.end()) {
      Fo.insert(V[i]);
      Folder[V[i]] = g;
      File[V[i]] = g;
    }
  }
  for (int i = 2; i < V.size(); i++) {
    if (i == V.size() - 1) {
      for (int j = 1; j <= i - 1; j++) File[V[j]].insert(V[i]);
    } else {
      for (int j = 1; j <= i - 1; j++) Folder[V[j]].insert(V[i]);
    }
  }
}
void A(string s) { B(s); }
int main() {
  string s;
  while (cin >> s) {
    A(s);
  }
  int aMax = 0, bMax = 0;
  string u;
  while (Fo.size() != 0) {
    u = *Fo.begin();
    Fo.erase(u);
    if (File[u].size() > bMax) bMax = File[u].size();
    if (Folder[u].size() > aMax) aMax = Folder[u].size();
  }
  cout << aMax << " " << bMax << endl;
  return 0;
}
