// parameter "input" gets all data
function Main(input) {
  // the first line is assigned to input[0], the second line is assigned to input[1] similarly.
  const tmp = input.split("\n")[0];
  if (input.endsWith("s")) {
    console.log(input + "es");
  } else {
    console.log(input + "s");
  }
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
