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

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

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

    return 0;
}
