import java.io.*; import java.util.*; class Main { public static void main(String args[])throws Exception { BufferedReader bu=new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb=new StringBuilder(); int n=Integer.parseInt(bu.readLine()); if(n%100==4 || n%100==5) sb.append("Yes\n"); else sb.append("No\n"); System.out.print(sb); } }