Update checkPair.cpp