#include <bits/stdc++.h>
using namespace std;
struct node {
  int folders, files;
  map<string, node *> g;
  node() : folders(0), files(0) {}
};
node root;
int max_files = 0, max_folders = 0;
void insert(node *root, const string &file) {
  int pos = file.find('\\');
  if (0 <= pos && pos < file.size()) {
    string fold = file.substr(0, pos);
    if (!root->g[fold]) root->g[fold] = new node;
    insert(root->g[fold], file.substr(pos + 1));
  } else
    ++root->files;
}
void dfs(node *root, int d = 0) {
  for (map<string, node *>::iterator i = root->g.begin(); i != root->g.end();
       ++i) {
    dfs(i->second, d + 1);
    root->folders += i->second->folders + 1;
    root->files += i->second->files;
  }
  if (d >= 2) {
    max_files = max(max_files, root->files);
    max_folders = max(max_folders, root->folders);
  }
}
int main() {
  string file;
  while (cin >> file) insert(&root, file);
  dfs(&root);
  cout << max_folders << ' ' << max_files << '\n';
  return 0;
}
