#include <bits/stdc++.h>
using namespace std;
struct node {
  map<string, node*> folders;
  set<string> files;
  ~node() {
    for (map<string, node*>::iterator it = folders.begin(); it != folders.end();
         it++) {
      delete it->second;
    }
  }
};
struct ans {
  int subfolders;
  int total_files;
};
ans solve(node* A) {
  assert(A != NULL);
  ans R;
  R.subfolders = A->folders.size();
  R.total_files = A->files.size();
  for (map<string, node*>::iterator it = A->folders.begin();
       it != A->folders.end(); it++) {
    ans temp = solve(it->second);
    R.subfolders += temp.subfolders;
    R.total_files += temp.total_files;
  }
  return R;
}
vector<string> split(const string& s) {
  int n = s.size();
  vector<string> result;
  int i = 0, j;
  while (i < n) {
    j = i;
    while (j + 1 < n && s[j + 1] != '\\') j++;
    result.push_back(s.substr(i, j - i + 1));
    i = j + 2;
  }
  return result;
}
node* root;
void add(vector<string>& parts) {
  int n = parts.size();
  node* current = root;
  for (int i = 0; i < n - 1; i++) {
    string curr = parts[i];
    if (current->folders.find(curr) == current->folders.end()) {
      current->folders[curr] = new node();
    }
    current = current->folders[curr];
  }
  string filename = parts[n - 1];
  current->files.insert(filename);
}
int main() {
  root = new node();
  string s;
  while (getline(cin, s, '\n')) {
    vector<string> parts = split(s);
    add(parts);
  }
  ans R;
  R.subfolders = 0;
  R.total_files = 0;
  for (map<string, node*>::iterator it = root->folders.begin();
       it != root->folders.end(); it++) {
    node* disk = it->second;
    for (map<string, node*>::iterator it2 = disk->folders.begin();
         it2 != disk->folders.end(); it2++) {
      ans temp = solve(it2->second);
      R.subfolders = max(R.subfolders, temp.subfolders);
      R.total_files = max(R.total_files, temp.total_files);
    }
  }
  cout << R.subfolders << ' ' << R.total_files;
  delete root;
  return 0;
}
