#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const int maxN = 1.1e4;
vector<int> g[maxN];
map<string, int> m[maxN];
int len = 1;
void add(int v, string s) {
  if (m[v][s] == 0) {
    m[v][s] = len;
    g[v].push_back(len);
    len++;
  }
}
void parse(string s) {
  s = s + "\\";
  string cur;
  int v = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '\\' && cur.size()) {
      add(v, cur);
      v = m[v][cur];
      cur = "";
    } else {
      cur.push_back(s[i]);
    }
  }
  cout << endl;
}
int mx[2];
pair<int, int> dfs(int v, int d) {
  pair<int, int> ans = {0, g[v].size() == 0};
  for (auto u : g[v]) {
    pair<int, int> p = dfs(u, d + 1);
    ans.first += p.first;
    ans.second += p.second;
  }
  if (d >= 2) {
    mx[0] = max(mx[0], ans.first);
    mx[1] = max(mx[1], ans.second);
  }
  if (g[v].size()) ans.first++;
  return ans;
}
int main() {
  string s;
  while (cin >> s) {
    parse(s);
  }
  dfs(0, 0);
  cout << mx[0] << " " << mx[1] << endl;
  return 0;
}
