#include<stdio.h>
int main()
{
    int a, b,c,d,e,f;
    scanf("%d", &a);

    if(100<=a && a<=999)
    {
        b= a%10;
        c= a/10;
        d= c%10;
        e= c/10;
        f= e%10;

        if(a==777)
        {
            printf("Yes\n");
        }

        else if(b==7)
        {
            printf("Yes\n%d contains 7 as its last digit.\n", a);
        }

        else if(d==7)
        {
            printf("Yes\n%d contains 7 as its middle digit.\n", a);
        }
        else if(f==7)
        {
            printf("Yes\n%d contains 7 as its first digit.\n", a);
        }

        else
        printf("No\n%d does not contain the digit 7.\n", a);
    }

    return 0;
}
