#include <stdio.h>

int main() {

    int N;
    int i;
    int a_count;
    int b_count;
    int c_count;

    scanf("%d", &N);

a_count = 0;

    while(N / 100 > 0) {
        N -= 100;
        a_count++;
        //printf("N = %d\n", N);
    }

    b_count = 0;

    while(N / 10 > 0) {
        N -= 10;
        b_count++;
        //printf("N = %d\n", N);
        }

        c_count = 0;

    while(N > 0) {
        N--;
        c_count++;
        //printf("N = %d\n", N);
    }
       //printf("%d %d %d\n",a_count, b_count, c_count);
    if(a_count == 7 || b_count == 7 || c_count == 7) {
        printf("Yes\n");
    }
        else {
            printf("No\n");
        }
            
        return 0;
    }