#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, -1, 0, 1};
unsigned long long GCD(unsigned long long x, unsigned long long y) {
  if (y == 0)
    return x;
  else
    return GCD(y, x % y);
}
unsigned long long LCM(unsigned long long a, unsigned long long b) {
  return (a * b / (GCD(a, b)));
}
bool PRIME(int p) {
  if (p <= 1) return false;
  if (p <= 3) return true;
  if (p % 2 == 0 || p % 3 == 0) return false;
  for (int i = 5; p >= i * i; i = i + 6) {
    if (p % i == 0 || p % (i + 2) == 0) return false;
  }
  return true;
}
long long NXT(long long a) {
  if (a <= 1) return 2;
  long long p = a;
  bool x = false;
  while (!x) {
    p++;
    if (PRIME(p)) x = true;
  }
  return p;
}
int main() {
  long long a, b, c, d, e, t, i, j, k, l, p, q, sum = 0, ans = 0, x, y, z, m, n,
                                                u, mx = -1, mn = 1e9;
  string A, B, C;
  x = 0, y = 0;
  map<string, set<string>> M;
  map<string, long long> MM;
  while (cin >> A) {
    i = 3;
    a = A.size();
    while (A[i] != '\\') i++;
    B = A.substr(0, i);
    MM[B]++;
    i++;
    while (i < a) {
      if (A[i] == '\\') {
        C = A.substr(0, i);
        M[B].insert(C);
      }
      i++;
    }
    t = 0;
    for (auto it = M[B].begin(); it != M[B].end(); it++) t++;
    x = max(x, t);
    y = max(y, MM[B]);
  }
  cout << x << " " << y << endl;
  return 0;
}
