#include <bits/stdc++.h>
using namespace std;
int main() {
  set<string> qq;
  string s, q, g[100000];
  int h, j = -1;
  while (cin >> s) {
    h = 3;
    q = "";
    q = q + s[0] + s[1] + s[2];
    while (h != s.length()) {
      while (s[h] != '\\' && s[h] != '.') {
        q += s[h];
        h++;
      }
      q += '/';
      if (s[h] != '.') {
        j++;
        g[j] = q;
      } else
        break;
      h++;
    }
  }
  j++;
  sort(g, g + j);
  int p = 1, max = 1;
  qq.insert(g[0]);
  for (int i = 1; i < j; i++) {
    if (g[i] == g[i - 1])
      p++;
    else
      p = 1;
    if (p > max) max = p;
    qq.insert(g[i]);
  }
  set<string>::iterator it;
  string w = "", t = "";
  int r = 0, max2 = 0;
  for (it = qq.begin(); it != qq.end(); it++) {
    if (w == "")
      w = *it;
    else {
      t = "";
      p = 1;
      for (int i = 0; i < w.length(); i++) {
        if (i == (*it).length()) {
          p = 0;
          break;
        }
        t += (*it)[i];
      }
      if (t != w) p = 0;
      if (p == 0) {
        w = *it;
        r = 0;
      } else {
        r++;
      }
      if (r > max2) max2 = r;
    }
  }
  cout << max2 << " " << max;
  return 0;
}
