#include <bits/stdc++.h>
using namespace std;
struct Trie {
  string key;
  vector<Trie> son;
  int qFolders, qFiles;
  bool file;
  Trie() {
    qFolders = qFiles = 0;
    file = false;
    key = "";
    son = vector<Trie>();
  }
  Trie(string s, bool mode = false) {
    qFolders = qFiles = 0;
    file = mode;
    key = s;
    son = vector<Trie>();
  }
  void push(char *st) {
    string name = "";
    int i = 0;
    while (st[i] && st[i] != '\\') {
      name.push_back(st[i]);
      i++;
    }
    if (!st[i]) {
      Trie novo = Trie(name, true);
      son.push_back(novo);
      return;
    }
    for (int j = 0, k = son.size(); j < k; j++)
      if (son[j].key == name) {
        son[j].push(st + i + 1);
        return;
      }
    Trie novo = Trie(name);
    novo.push(st + i + 1);
    son.push_back(novo);
  }
  void counter() {
    if (file) {
      qFiles = 1;
      return;
    }
    qFolders = 1;
    for (int i = 0, j = son.size(); i < j; i++) {
      son[i].counter();
      qFiles += son[i].qFiles;
      qFolders += son[i].qFolders;
    }
  }
  pair<int, int> Max() {
    pair<int, int> best = pair<int, int>(0, 0);
    pair<int, int> a;
    for (int i = 0, j = son.size(); i < j; i++) {
      a.first = son[i].qFolders;
      a.second = son[i].qFiles;
      best.first = max(best.first, a.first);
      best.second = max(best.second, a.second);
    }
    return best;
  }
  void search() {
    pair<int, int> best = pair<int, int>(0, 0);
    pair<int, int> a;
    for (int i = 0, j = son.size(); i < j; i++) {
      a = son[i].Max();
      best.first = max(best.first, a.first);
      best.second = max(best.second, a.second);
    }
    printf("%d %d\n", best.first - 1, best.second);
  }
};
char st[203];
void read() {
  Trie trie = Trie("israel");
  while (scanf("%s", st) != EOF) {
    trie.push(st);
  }
  trie.counter();
  trie.search();
}
int main() {
  read();
  return 0;
}
