#include <bits/stdc++.h>
using namespace std;
map<string, vector<string> > dir;
map<string, vector<string> > file;
int main() {
  string s;
  while (cin >> s) {
    int count = 0;
    int pos = 0;
    for (size_t i = 0; i < s.size(); i++) {
      if (s[i] == '\\') {
        pos = i;
      }
    }
    string file_name = s.substr(pos, s.size() - pos);
    string parent;
    int count1 = 0;
    for (size_t i = 0; i < s.size(); i++) {
      if (s[i] == '\\') {
        if (count1 == 1) {
          parent = s.substr(0, i);
          break;
        }
        count1++;
      }
    }
    for (size_t i = 3; i < s.size(); i++) {
      if (s[i] == '\\') {
        if (count >= 1) {
          dir[parent].push_back(s.substr(0, i));
        }
        file[s.substr(0, i)].push_back(file_name);
        count++;
      }
    }
  }
  size_t mnd = 0;
  for (map<string, vector<string> >::const_iterator it = dir.begin();
       it != dir.end(); it++) {
    vector<string> buf = it->second;
    sort(buf.begin(), buf.end());
    buf.erase(unique(buf.begin(), buf.end()), buf.end());
    mnd = mnd > buf.size() ? mnd : buf.size();
  }
  int mn = 0;
  for (map<string, vector<string> >::const_iterator it = file.begin();
       it != file.end(); it++) {
    mn = it->second.size() > mn ? it->second.size() : mn;
  }
  cout << mnd << " " << mn << endl;
  return 0;
}
