#include <iostream> using namespace std; bool is_num(string s) { for (char c : s) { if ( c < '0' || c > '9') { return false; } } return true; } int main() { string str; pair<int, int>p(0, 0); while (getline(cin, str, ';')) { ...