function Main(input) {
    const s = input.trim().split(" ");
    const end = s.slice(-1);

    if(end === "s") {
        console.log(`${s}es`);
    } else {
        console.log(`${s}s`);
    }
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));