#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include <iomanip> #include <numeric> #include <string> #define in std::cin #define out std::cout std::string S; int main() { using std::endl; in.sync_with_stdio(false); out.sync_with_stdio(false); in >> S; int rcount = 0; int pos = 0; for(;;) { pos = S.find("(*", pos); if (pos == S.npos) { break; } ++rcount; pos += 2; } out << (S.size() / 5 - rcount) << ' ' << rcount << endl; return 0; } #endif