function main(arg) {
	arg = Number(arg.split("\n")[0])

	if (arg === 3 || arg === 5 || arg === 5) {
		console.log("YES")
	} else {

		console.log("NO")
	}

	
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));