#include <bits/stdc++.h>
using namespace std;
const int N = 104;
vector<unsigned long long> v;
vector<int> g[N * N];
map<unsigned long long, int> mp;
set<pair<int, int> > st;
int idx = 0, p = 0, b[N];
unsigned long long a[N];
int getNum(unsigned long long hs) {
  if (mp.count(hs)) return mp[hs];
  return mp[hs] = ++idx;
}
string s;
int f = 0, h = 0;
int dfs(int u) {
  int ans = 0;
  for (int i = 0; i < g[u].size(); i++) ans += dfs(g[u][i]);
  if (g[u].empty()) ++h;
  return ans + 1;
}
int main() {
  while (cin >> s) {
    s += '\\';
    p = 0;
    unsigned long long hs = 0;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == '\\' && s[i - 1] != ':') a[++p] = hs;
      hs = hs * 131 + s[i];
    }
    for (int i = 1; i <= p; i++) b[i] = getNum(a[i]);
    for (int i = 1; i <= p; i++) {
      int u = b[i - 1], v = b[i];
      if (!st.count(pair<int, int>(u, v))) {
        st.insert(pair<int, int>(u, v));
        g[u].push_back(v);
      }
    }
  }
  int ansa = 0, ansb = 0;
  for (int i = 0; i < g[0].size(); i++) {
    h = 0;
    f = dfs(g[0][i]);
    ansa = max(ansa, f - h - 1);
    ansb = max(ansb, h);
  }
  printf("%d %d\n", ansa, ansb);
}
