#include <bits/stdc++.h>
using namespace std;
void solutionC();
int main() {
  ios_base::sync_with_stdio(false);
  solutionC();
  return EXIT_SUCCESS;
}
long long 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, long long> next;
} t[100000];
long long sz;
void add(long long v, const vector<string>& s, long long p) {
  long long 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);
}
long long a, b;
pair<long long, long long> dfs(long long v, long long h) {
  if (t[v].is_file) return {0, 1};
  pair<long long, long long> c = {1, 0};
  for (auto it : t[v].next) {
    pair<long long, long long> 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() {
  long long root = 0;
  t[root].name = "";
  t[root].next.clear();
  t[root].is_file = false;
  sz = 1;
  for (long long 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;
  }
}
