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

	tmp = tmp.split(" ")

	tmp  = tmp.map(e => Number(e))
	
	tmp.sort()

	tmp = tmp.join("")

	if (tmp === "1479") {
		console.log("YES")
	} else {
		console.log("NO")
	}

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