#include <stdio.h>
#include <math.h>

#define n 3
#define p 10

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

	int x = N;
	int a[n];
	for (int i = n - 1; i--; i > 0)
	{
		a[i] = x / pow(p, i);

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

		x -= a[i] * pow(p, i);
	}

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