The function std::max requires a functions to compare two pairs