#include <bits/stdc++.h>
using namespace std;
const int N = 200021;
inline int scan() {
  char c = getchar();
  int x = 0;
  while (c < '0' || c > '9') {
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return x;
}
int n;
string s[128];
vector<string> split(string t, char d) {
  vector<string> r;
  string w;
  for (char ch : t) {
    if (ch == d) {
      r.push_back(w);
      w = "";
    } else {
      w += ch;
    }
  }
  r.push_back(w);
  return r;
}
struct node {
  string name;
  bool is_file;
  map<string, int> next;
} t[100000];
int sz;
void add(int v, const vector<string>& s, int p) {
  int n = s.size();
  if (n == p) {
    t[v].is_file = true;
    return;
  }
  if (!t[v].next.count(s[p])) {
    t[v].next[s[p]] = sz;
    t[sz].name = s[p];
    t[sz].next.clear();
    t[sz].is_file = false;
    ++sz;
  }
  add(t[v].next[s[p]], s, p + 1);
}
int a, b;
pair<int, int> dfs(int v, int h) {
  if (t[v].is_file) return {0, 1};
  pair<int, int> c = {1, 0};
  for (auto it : t[v].next) {
    pair<int, int> r = dfs(it.second, h + 1);
    c.first += r.first;
    c.second += r.second;
  }
  if (h >= 2) {
    a = max(a, c.first - 1);
    b = max(b, c.second);
  }
  return c;
}
void solve() {
  int root = 0;
  t[root].name = "";
  t[root].next.clear();
  t[root].is_file = false;
  sz = 1;
  for (int i = 0; i < n; ++i) add(root, split(s[i], '\\'), 0);
  a = 0, b = 0;
  dfs(root, 0);
  cout << a << " " << b << endl;
}
void solutionC() {
  for (; getline(cin, s[0]);) {
    n = 1;
    while (getline(cin, s[n])) {
      if (s[n].empty()) break;
      ++n;
    }
    solve();
    cerr << endl;
  }
}
int main() {
  solutionC();
  return 0;
}
