cin >> N;
for (int i = 0; i < N; i++)
{
cin.ignore(100,'(');
cin >> X[i];
cin.ignore(100,',');
cin >> Y[i];
cin.ignore(100,')');
}
It can handle whitespaces also, as it can read input like:
2 ( 1 , 3 ) ( 5 , 6 )
Demonstration at ideone: http://www.ideone.com/hO0xG