#include <bits/stdc++.h>
using namespace std;
struct node {
  string name;
  int type;
  vector<int> sons;
};
struct ans {
  int folders, files;
};
string s, names;
vector<node> filesystem;
ans res, temp;
void init_filesystem() {
  filesystem.resize(5);
  names = "CDEFG";
  for (int i = 0; i < 5; i++) {
    filesystem[i].name = names[i];
    filesystem[i].type = 0;
    filesystem[i].sons.clear();
  }
}
void put(int u, int start) {
  int j = start;
  string name;
  name.clear();
  if (j >= s.length()) return;
  while (j < s.length() && s[j] != '\\') {
    name.push_back(s[j]);
    j++;
  }
  bool found = false;
  for (int i = 0; i < filesystem[u].sons.size(); i++) {
    int x = filesystem[u].sons[i];
    if (filesystem[x].name == name) {
      found = true;
      put(x, j + 1);
    }
  }
  if (!found) {
    filesystem[u].sons.push_back(filesystem.size());
    int x = filesystem.size();
    filesystem.resize(x + 1);
    filesystem[x].name = name;
    if (j == s.length())
      filesystem[x].type = 2;
    else
      filesystem[x].type = 1;
    put(x, j + 1);
  }
}
ans dfs(int u) {
  ans t, ret;
  ret.files = 0;
  ret.folders = 0;
  for (int i = 0; i < filesystem[u].sons.size(); i++) {
    t = dfs(filesystem[u].sons[i]);
    ret.files += t.files;
    ret.folders += t.folders;
  }
  if (filesystem[u].type == 2) ret.files++;
  if (filesystem[u].type == 1) {
    res.files = max(res.files, ret.files);
    res.folders = max(res.folders, ret.folders);
    ret.folders++;
  }
  return ret;
}
int main() {
  init_filesystem();
  while (cin >> s) {
    for (int i = 0; i < 5; i++)
      if (names[i] == s[0]) {
        put(i, 3);
      }
  }
  for (int i = 0; i < 5; i++) dfs(i);
  cout << res.folders << ' ' << res.files;
}
