#include<stdio.h>

int main(){
	int N, a,b,c;
	scanf("%d", &N);
	c = N%10;
	b = (N%100 - c)/10;
	a = (N - b - c)/100;
	printf("%d %d %d\n", a, b, c);
	if(a == 7 || b == 7 || c == 7){
		printf("Yes\n");
	}else{
		printf("No\n");
	}
	return 0;
}