read -a list
array=(`for i in ${list[@]}; do echo $i; done | sort -n`)
if [ "${array[0]}" = "1" ] && [ "${array[1]}" = "4" ] && [ "${array[2]}" = "7" ] && [ "${array[3]}" = "9" ]; then
	echo YES
else
	echo NO
fi