#include
using namespace std;
int main() {
char ch ;
cin>>ch;
int x = 0;
int y = 0 ;
while (ch != '\n'){
if(ch=='n'){
x++ ;
}
else if (ch=='s'){
x=x-1;
}
else if (ch=='e'){
y++ ;
}
else {
y = y-1 ;
}
cin>>ch;
}
cout<<x<<","<<y ;
return 0 ;
}