#include <bits/stdc++.h>
using namespace std;
long long n = 0, kol = 0;
string s[1 << 7];
long long a[1 << 20], b[1 << 20], file[1 << 20], directory[1 << 20];
void dfs(int s) {
  for (int i = 0; i < kol; ++i)
    if (a[i] == b[s]) {
      ++file[i];
      dfs(i);
    }
}
void dfss(int s) {
  for (int i = 0; i < kol; ++i)
    if (a[i] == b[s]) {
      ++directory[i];
      dfss(i);
    }
}
void proc(int i) {
  long long num = 0, num2 = 0;
  num = (((long long)s[i][0] * 1103) + s[i][1]) * 1103 + s[i][2];
  int j = 3;
  while (j < (int)s[i].length()) {
    while (j < (int)s[i].length() && s[i][j] != '\\') {
      num = num * 1103 + (long long)s[i][j];
      ++j;
    }
    num = num * 1103 + (long long)s[i][j];
    ++j;
    int YES = 0;
    for (int k = 0; k < kol; ++k)
      if (a[k] == num) ++YES;
    if (!YES) {
      a[kol] = num;
      b[kol] = num2;
      ++kol;
      dfss(kol - 1);
    }
    num2 = num;
    if (j >= (int)s[i].length()) dfs(kol - 1);
  }
}
int main() {
  while (cin >> s[n]) ++n;
  memset(a, 0, sizeof a);
  memset(file, 0, sizeof file);
  memset(b, 0, sizeof b);
  memset(directory, 0, sizeof directory);
  for (int i = 0; i < n; ++i) proc(i);
  long long maxF = 0, maxD = 0;
  for (int i = 0; i < kol; ++i) maxF = max(maxF, file[i]);
  for (int i = 0; i < kol; ++i) {
    directory[i] -= file[i];
    maxD = max(maxD, directory[i]);
  }
  cout << maxD << ' ' << maxF;
  return 0;
}
