foundPos == std::string::npos // 說明沒有查詢到
// 9'15"
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
int cnt = 0, first = 0, potcnt = 0;
while(getline(cin,s))
{
if(s == ".") break;
++ cnt;
if(s.find("chi1 huo3 guo1", 0) != string::npos)
first = (potcnt ++ == 0 ? cnt : first);
}
cout << cnt << endl;
if(potcnt == 0) cout << "-_-#";
else cout << first << " " << potcnt;
return 0;
}