#include<iostream>
#include<fstream>
#include<cstring>
using namespace std;
int main(){
int litere=0, cifre=0;
ifstream f("intrare.txt");
char x;
while(f>>x){
if(strchr("0123456789", x)!=NULL) cifre++;
if(strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", x)!=NULL) litere++;
}
cout<<litere<<' '<<cifre;
return 0;
}