#include <iostream>
using namespace std;

int main() 
{
	int r = -1;
	int c = -1;
	bool valid = false;
	do
	{
	    cout<<"Insert coordinates: ";
	    if (cin >> r >> c)
	    {
	        if (r >= 0 && r <= 10 && c >= 0 && c <= 10)
	        {
	            valid = true;
	        }
	    }
	    else
	    {
	    	cin.clear();
	    	cin.ignore();
	    }
	
	    if (!valid)
	    {
	        cout << "ERROR:  Number of row and column must be an integer between 0 and 10." << endl;
	    }
	} while (!valid);
	
	cout << "You entered (" << r << ", " << c << ")" << endl; 
	
	return 0;
}