#include <stdio.h>

#define n 3
#define p 10

int main()
{
	int N;
	scanf("%d", &N);

	int a;
	int x = N;
	int y = p * p * p;

	for (int i = n - 1; i--; i >= 0)
	{
		a = x / y;

		if (a == 7)
		{
			printf("Yes\n");
			return 0;
		}

		x -= a * y;
		y /= p;
	}

	printf("No\n");
	return 0;
}