import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int[] v = { 4, 7 };
		boolean[] dp = new boolean[n + 1];
		dp[0] = true;
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		}
		if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int[] v = { 4, 7 };
		boolean[] dp = new boolean[n + 1];
		dp[0] = true;
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		}
		if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int[] v = { 4, 7 };
		boolean[] dp = new boolean[n + 1];
		dp[0] = true;
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		}
		if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int[] v = { 4, 7 };
		boolean[] dp = new boolean[n + 1];
		dp[0] = true;
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		}
		if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] v = { 4, 7 }; v { 4, 7 } 4 7 boolean[] dp = new boolean[n + 1]; dp new boolean[n + 1] n + 1 n 1 dp[0] = true dp[0] dp 0 true for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		} int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		} {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		} for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			} int j = 0; int j = 0; j 0 j < n + 1 j n + 1 n 1 j++ j++ j {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			} {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			} if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				} j >= v[i] j v[i] v i {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				} if (dp[j - v[i]]) {
						dp[j] = true;
					} dp[j - v[i]] dp j - v[i] j v[i] v i {
						dp[j] = true;
					} dp[j] = true dp[j] dp j true if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} dp[n] dp n {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int[] v = { 4, 7 };
		boolean[] dp = new boolean[n + 1];
		dp[0] = true;
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		}
		if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int[] v = { 4, 7 };
		boolean[] dp = new boolean[n + 1];
		dp[0] = true;
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		}
		if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int[] v = { 4, 7 };
		boolean[] dp = new boolean[n + 1];
		dp[0] = true;
		for (int i = 0; i < 2; i++) {
			for (int j = 0; j < n + 1; j++) {
				if (j >= v[i]) {
					if (dp[j - v[i]]) {
						dp[j] = true;
					}
				}
			}
		}
		if (dp[n]) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
