#include #include #include int main() { int n, success = 0, failed = 0; std::cin >> n; for (int i = 0; i < n; i++) { int millis; std::string str; std::cin >> millis >> str; int type = (12 * millis / 1000 > str.length() ? str.length() : 12 * millis / 1000); success += type; failed += str.length() - type; } std::cout << success << " " << failed << std::endl; return 0; }