#include <bits/stdc++.h>
using namespace std;
struct NODE {
  char name[102];
  int to;
};
struct TRIE {
  vector<NODE> fold, file;
};
TRIE trie[5][10010];
int cnt[5];
int ans_file, ans_fold;
int track(int index, int tar, int &layer) {
  int i, j, count = 0;
  if (trie[index][tar].fold.size() < 1) {
    return trie[index][tar].file.size();
  } else {
    for (i = 0, j = trie[index][tar].fold.size(); i < j; ++i) {
      count += track(index, trie[index][tar].fold[i].to, layer);
    }
    layer += trie[index][tar].fold.size();
    return (count + trie[index][tar].file.size());
  }
}
int main() {
  int i, j, index, now;
  char in[102], *p;
  NODE tmp;
  memset(trie, 0, sizeof(trie));
  memset(cnt, 0, sizeof(cnt));
  while (scanf("%s", in) != EOF) {
    p = strtok(in, ":\\");
    if (p[0] == 'C')
      index = 0;
    else if (p[0] == 'D')
      index = 1;
    else if (p[0] == 'E')
      index = 2;
    else if (p[0] == 'F')
      index = 3;
    else if (p[0] == 'G')
      index = 4;
    now = 0;
    p = strtok(NULL, "\\");
    while (p != NULL) {
      for (i = 0, j = strlen(p); i < j; ++i)
        if (p[i] == '.') break;
      if (i == j) {
        for (i = 0, j = trie[index][now].fold.size(); i < j; ++i)
          if (!strcmp(trie[index][now].fold[i].name, p)) break;
        if (i == j) {
          strcpy(tmp.name, p);
          tmp.to = ++cnt[index];
          trie[index][now].fold.push_back(tmp);
          now = cnt[index];
        } else {
          now = trie[index][now].fold[i].to;
        }
      } else {
        strcpy(tmp.name, p);
        trie[index][now].file.push_back(tmp);
      }
      p = strtok(NULL, "\\");
    }
  }
  for (i = 0, ans_file = 0, ans_fold = 0; i < 5; ++i) {
    for (j = 0, now = trie[i][0].fold.size(); j < now; ++j) {
      index = 0;
      ans_file = max(ans_file, track(i, trie[i][0].fold[j].to, index));
      ans_fold = max(ans_fold, index);
    }
  }
  printf("%d %d\n", ans_fold, ans_file);
  return 0;
}
