stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <cstdio>

#include <cstring>

#include <string>

#include <queue>

#include <map>

#include <set>

#include <vector>

#include <iostream>

using std::string;

using std::queue;

using std::map;

using std::set;

using std::vector;

int n;

map<string,int> mp;

set<string> st[2010]; 

vector<int> edge[2010];

int in[2010];

char s[100010];

int tot;

string str[2010];

bool init()

{

	memset(in,0,sizeof(in));

	for(int i = 0; i < 2010; i++) edge[i].clear();

	tot = 0; mp.clear();

	scanf("%d",&n);

	if(!n) return false;

	for(int i = 0; i < n; i++)

	{

		scanf("%s",s);

	    string tmp = "";

		int j;

		for(j = 0; s[j]!=':'; j++) tmp += s[j];

		if(mp.find(tmp) == mp.end()) mp[tmp] = tot++,str[tot-1] = tmp;

		int fa = mp[tmp];

		tmp = "";

		for(j++;s[j];j++)

		{

			if(s[j]==',' || s[j] == '.')

			{

				if(mp.find(tmp) == mp.end()) mp[tmp] = tot++,str[tot-1]=tmp;

				edge[mp[tmp]].push_back(fa);

				in[fa]++;

				tmp = "";

			}

			else tmp += s[j];

		}

	}

//	for(int i= 0; i < tot; i++) std::cout<<str[i]<<std::endl;

	return true;

}

void solve()

{

	queue<int> Q;

	for(int i = 0; i < tot; i++) st[i].clear();

	for(int i = 0; i < tot; i++) if(!in[i]) 

	{

	//	printf("i=%d\n",i);

		Q.push(i);

		st[i].insert(str[i]);

	}

	while(!Q.empty())

	{

		int fr = Q.front();Q.pop();

		for(int i = 0; i < edge[fr].size(); i++)

		{

			int to = edge[fr][i];

			--in[to];

			for(set<string>::iterator it = st[fr].begin(); it != st[fr].end(); it++)

			{

				st[to].insert(*it);

			}

			if(!in[to])

			{

				Q.push(to);

			}

		}

	}

	printf("%d\n",st[0].size());

}

int main()

{

	while(init())

		solve();

}

// Faster C++ solution for the same problem (measured speedup: 1.1966638351064338x):
#include <bits/stdc++.h>

using namespace std;



map<string, set<string>> res;

set<string> te;

map<string, int> OK;



set<string> dfs(const string& s) {

	if (OK[s]) {

		return res[s];

	}

	OK[s] = 1;

	auto tmp = res[s];

	for (auto t : tmp) {

		if (te.count(t) == 0) {

			continue;

		}

		res[s].erase(t);

		auto ss = dfs(t);

		res[s].insert(ss.begin(), ss.end());

	}

	return res[s];

}



int main()

{

	int n;

	while (cin >> n, n) {

		string S;

		vector<string> t(n);

		for(int j = 0;j < n;j++) {

			cin >> S;

			int tmp = 0;

			for (int i = 0; i < (int)S.size(); i++) {

				if (S[i] == ':') {

					te.insert(S.substr(0, i));

					t[j] = S.substr(0, i);

					tmp = i + 1;

				}

				else if (S[i] == ',' || S[i] == '.') {

					res[t[j]].insert(S.substr(tmp, i - tmp));

					tmp = i + 1;

				}

			}

		}

		cout << dfs(t[0]).size() << endl;

		res.clear();

		te.clear();

		OK.clear();

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define IO ios::sync_with_stdio(0), cin.tie(0) 

using namespace std;

typedef long long ll;

const int maxn = 1e5 + 5;

const int inf = ~0u >> 1;

int main() {

    IO;

    int n;

    cin >> n;

    if (n % 10 == 7 || n / 10 % 10 == 7 || n / 100 == 7) {

        cout << "Yes" << endl;

    } 

    else

    {

        cout << "No" << endl;

    }

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.389769232265355x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

	string s;

	while(cin>>s){

		bool f=0;

		for(int i=0;i<3;++i)

			if(s[i]=='7')	f=1;

			if(f) puts("Yes");

			else puts("No");

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.323622487093086x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define elif else if

typedef long long ll;

typedef unsigned long long ull;

#define DEBUG(x) cout<<(x)<<endl

#define TGET(a,b) get<b>(a)



int main()

{

    int n;

    scanf("%d", &n);

    int flag = 0;

    while(n)

    {

        if(n%10==7)

        {

            flag = 1;

        }

        n /= 10;

    }

    if(flag)

    {

        printf("Yes\n");

    }

    else

    {

        printf("No\n");

    }

    

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2505152745422015x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include<cstdio>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<cstdlib>

#include<queue>

#include<map>

#include<stack>

#include<set>

#include<vector>

#include<functional>

using namespace std;

typedef long long LL;

bool flag=0;

inline LL read()

{

	LL kk=0,f=1;

	char cc=getchar();

	while(cc<'0'||cc>'9'){if(cc=='-')f=-1;cc=getchar();}

	while(cc>='0'&&cc<='9'){if(cc-'0'==7)flag=1;kk=(kk<<1)+(kk<<3)+cc-'0';cc=getchar();}

	return kk*f;

}

int main()

{

	int k=read();

	if(flag)printf("Yes\n");

	else printf("No\n");

}

// Faster C++ solution for the same problem (measured speedup: 5.23753686387777x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

	string s;

	cin>>s;

	for(int i=0;i<s.length();i++)

	{

		if(s[i]=='7')

		{

			puts("Yes");

			return 0;

		}

	}

	puts("No");

 } 

// Faster C++ solution for the same problem (measured speedup: 5.278481677653336x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include<iostream>



using namespace std;



int main(){

    char c[5]={0};

    cin>>c;

    int T=5,f=0;

    while(T--){

        if(c[T]=='7'){

            f=1;

            break;

        }

    }

    if(f) cout<<"Yes";

    else cout<<"No";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.25340813140784x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define pb push_back

#define mp make_pair

#define F(i,n) for (int i = 0; i < n; ++i)

#define F1(i,n) for (int i = 1; i <= n; ++i)

#define rof(i, n) for (int i = ((n) - 1); i >= 0; i--)

typedef long long ll;

using namespace std;

vector<int>ivec;

vector<long long>lvec;

vector< pair<int, int> > pvec;

set< int, greater<int> >gset;

set<int, less<int> >lset;

set< int, greater<int> > ::iterator s;

void setprint()

 {

     set<int>so;

     set<int> :: iterator s;

     for(s=so.begin();s!=so.end();s++)

        cout<<*s<<" ";

 }



int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);

    /*

    {

       Md: Saroar Zahan Sojib

       Green University of Bangladesh

       https://web.facebook.com/sojib.bdb

    }

   */



  int n;

  cin>>n;

  vector<int>vec;

  int reminder;

  while(n!=0)

  {

      reminder=n%10;

      n=n/10;

      vec.push_back(reminder);

  }

  int count=0;

  for(auto x:vec)

  {

      if(x==7)

      {

          count++;

      }

  }

  if(count==0)cout<<"No"<<endl;

  else

    cout<<"Yes"<<endl;



}

// Faster C++ solution for the same problem (measured speedup: 5.444896089633259x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main(){

    int num;

    cin>>num;



    while(num != 0){

        int temp = num%10;

        if(temp == 7){

            cout<<"Yes"<<endl;

            return 0;

        }

        num /= 10;

    }

    cout<<"No"<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.315696976571009x):
#include<stdio.h>



main()

{

    int n,flag=0,res;

    scanf("%d",&n);



    while(n!=0)

    {

        res = n%10;

        n/=10;

        if(res==7)

        {

            flag=1;

            break;

        }

    }

    if(flag)

        printf("Yes");

    else

        printf("No");

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define IO ios::sync_with_stdio(0), cin.tie(0) 

using namespace std;

typedef long long ll;

const int maxn = 1e5 + 5;

const int inf = ~0u >> 1;

int main() {

    IO;

    int n;

    cin >> n;

    if (n % 10 == 7 || n / 10 % 10 == 7 || n / 100 == 7) {

        cout << "Yes" << endl;

    } 

    else

    {

        cout << "No" << endl;

    }

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.39317490281674x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

	string s;

	while(cin>>s){

		bool f=0;

		for(int i=0;i<3;++i)

			if(s[i]=='7')	f=1;

			if(f) puts("Yes");

			else puts("No");

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.3269863610456945x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define elif else if

typedef long long ll;

typedef unsigned long long ull;

#define DEBUG(x) cout<<(x)<<endl

#define TGET(a,b) get<b>(a)



int main()

{

    int n;

    scanf("%d", &n);

    int flag = 0;

    while(n)

    {

        if(n%10==7)

        {

            flag = 1;

        }

        n /= 10;

    }

    if(flag)

    {

        printf("Yes\n");

    }

    else

    {

        printf("No\n");

    }

    

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.253832953737641x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<cstdlib>

#include<queue>

#include<map>

#include<stack>

#include<set>

#include<vector>

#include<functional>

using namespace std;

typedef long long LL;

bool flag=0;

inline LL read()

{

	LL kk=0,f=1;

	char cc=getchar();

	while(cc<'0'||cc>'9'){if(cc=='-')f=-1;cc=getchar();}

	while(cc>='0'&&cc<='9'){if(cc-'0'==7)flag=1;kk=(kk<<1)+(kk<<3)+cc-'0';cc=getchar();}

	return kk*f;

}

int main()

{

	int k=read();

	if(flag)printf("Yes\n");

	else printf("No\n");

}

// Faster C++ solution for the same problem (measured speedup: 5.240846342315606x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

	string s;

	cin>>s;

	for(int i=0;i<s.length();i++)

	{

		if(s[i]=='7')

		{

			puts("Yes");

			return 0;

		}

	}

	puts("No");

 } 

// Faster C++ solution for the same problem (measured speedup: 5.281817028172241x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<iostream>



using namespace std;



int main(){

    char c[5]={0};

    cin>>c;

    int T=5,f=0;

    while(T--){

        if(c[T]=='7'){

            f=1;

            break;

        }

    }

    if(f) cout<<"Yes";

    else cout<<"No";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.256727638532641x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define pb push_back

#define mp make_pair

#define F(i,n) for (int i = 0; i < n; ++i)

#define F1(i,n) for (int i = 1; i <= n; ++i)

#define rof(i, n) for (int i = ((n) - 1); i >= 0; i--)

typedef long long ll;

using namespace std;

vector<int>ivec;

vector<long long>lvec;

vector< pair<int, int> > pvec;

set< int, greater<int> >gset;

set<int, less<int> >lset;

set< int, greater<int> > ::iterator s;

void setprint()

 {

     set<int>so;

     set<int> :: iterator s;

     for(s=so.begin();s!=so.end();s++)

        cout<<*s<<" ";

 }



int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);

    /*

    {

       Md: Saroar Zahan Sojib

       Green University of Bangladesh

       https://web.facebook.com/sojib.bdb

    }

   */



  int n;

  cin>>n;

  vector<int>vec;

  int reminder;

  while(n!=0)

  {

      reminder=n%10;

      n=n/10;

      vec.push_back(reminder);

  }

  int count=0;

  for(auto x:vec)

  {

      if(x==7)

      {

          count++;

      }

  }

  if(count==0)cout<<"No"<<endl;

  else

    cout<<"Yes"<<endl;



}

// Faster C++ solution for the same problem (measured speedup: 5.4483365935711285x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main(){

    int num;

    cin>>num;



    while(num != 0){

        int temp = num%10;

        if(temp == 7){

            cout<<"Yes"<<endl;

            return 0;

        }

        num /= 10;

    }

    cout<<"No"<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.319055842576777x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>



using namespace std;



int main()

{

    int n;



    cin >> n;



    bool flg=0;



    while(n!=0)

    {

        if(n%10==7)

        {

            flg=1;

            cout << "Yes" << endl;

            break;



        }



        n=n/10;



    }



    if(flg==0)

    {

        cout << "No" <<endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.319055842576777x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



int main()

{

    int n, fact = 1;



    scanf("%d", &n);



    int t = n;



    while(t) {

        t = t / 10;

        fact = fact * 10;

    }



    while(fact > 1) {

        fact = fact / 10;

        if(n / fact == 7) {

            printf("Yes\n");

            return 0;

        }

        n = n % fact;

    }

    printf("No\n");



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.253579077799383x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define ll long long

#define fast_in_out  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);



int main()

{

    fast_in_out;

    int n;

    cin >> n;

    bool found = false;

    while(n != 0)

    {

        if(n % 10 == 7)

        {

            found = true;

            break;

        }

        n /= 10;

    }

    if(found)

    {

        cout << "Yes";

    }

    else

    {

        cout << "No";

    }

}


// Faster C++ solution for the same problem (measured speedup: 5.384009144199909x):
#include<stdio.h>

 

int main(){

	int N;

	scanf("%d", &N);

	if( N%10==7 || (N/10)%10==7 || N/100==7)

		printf("Yes\n");

	else

		printf("No\n");

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define IO ios::sync_with_stdio(0), cin.tie(0) 

using namespace std;

typedef long long ll;

const int maxn = 1e5 + 5;

const int inf = ~0u >> 1;

int main() {

    IO;

    int n;

    cin >> n;

    if (n % 10 == 7 || n / 10 % 10 == 7 || n / 100 == 7) {

        cout << "Yes" << endl;

    } 

    else

    {

        cout << "No" << endl;

    }

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.391623305657505x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

	string s;

	while(cin>>s){

		bool f=0;

		for(int i=0;i<3;++i)

			if(s[i]=='7')	f=1;

			if(f) puts("Yes");

			else puts("No");

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.3254538060935515x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define elif else if

typedef long long ll;

typedef unsigned long long ull;

#define DEBUG(x) cout<<(x)<<endl

#define TGET(a,b) get<b>(a)



int main()

{

    int n;

    scanf("%d", &n);

    int flag = 0;

    while(n)

    {

        if(n%10==7)

        {

            flag = 1;

        }

        n /= 10;

    }

    if(flag)

    {

        printf("Yes\n");

    }

    else

    {

        printf("No\n");

    }

    

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2523214447595326x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<cmath>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<cstdlib>

#include<queue>

#include<map>

#include<stack>

#include<set>

#include<vector>

#include<functional>

using namespace std;

typedef long long LL;

bool flag=0;

inline LL read()

{

	LL kk=0,f=1;

	char cc=getchar();

	while(cc<'0'||cc>'9'){if(cc=='-')f=-1;cc=getchar();}

	while(cc>='0'&&cc<='9'){if(cc-'0'==7)flag=1;kk=(kk<<1)+(kk<<3)+cc-'0';cc=getchar();}

	return kk*f;

}

int main()

{

	int k=read();

	if(flag)printf("Yes\n");

	else printf("No\n");

}

// Faster C++ solution for the same problem (measured speedup: 5.2393385695392265x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

	string s;

	cin>>s;

	for(int i=0;i<s.length();i++)

	{

		if(s[i]=='7')

		{

			puts("Yes");

			return 0;

		}

	}

	puts("No");

 } 

// Faster C++ solution for the same problem (measured speedup: 5.280297468275855x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include<iostream>



using namespace std;



int main(){

    char c[5]={0};

    cin>>c;

    int T=5,f=0;

    while(T--){

        if(c[T]=='7'){

            f=1;

            break;

        }

    }

    if(f) cout<<"Yes";

    else cout<<"No";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.255215296764055x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define pb push_back

#define mp make_pair

#define F(i,n) for (int i = 0; i < n; ++i)

#define F1(i,n) for (int i = 1; i <= n; ++i)

#define rof(i, n) for (int i = ((n) - 1); i >= 0; i--)

typedef long long ll;

using namespace std;

vector<int>ivec;

vector<long long>lvec;

vector< pair<int, int> > pvec;

set< int, greater<int> >gset;

set<int, less<int> >lset;

set< int, greater<int> > ::iterator s;

void setprint()

 {

     set<int>so;

     set<int> :: iterator s;

     for(s=so.begin();s!=so.end();s++)

        cout<<*s<<" ";

 }



int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);

    /*

    {

       Md: Saroar Zahan Sojib

       Green University of Bangladesh

       https://web.facebook.com/sojib.bdb

    }

   */



  int n;

  cin>>n;

  vector<int>vec;

  int reminder;

  while(n!=0)

  {

      reminder=n%10;

      n=n/10;

      vec.push_back(reminder);

  }

  int count=0;

  for(auto x:vec)

  {

      if(x==7)

      {

          count++;

      }

  }

  if(count==0)cout<<"No"<<endl;

  else

    cout<<"Yes"<<endl;



}

// Faster C++ solution for the same problem (measured speedup: 5.446769126590459x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



int main(){

    int num;

    cin>>num;



    while(num != 0){

        int temp = num%10;

        if(temp == 7){

            cout<<"Yes"<<endl;

            return 0;

        }

        num /= 10;

    }

    cout<<"No"<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.3175255692064765x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>



using namespace std;



int main()

{

    int n;



    cin >> n;



    bool flg=0;



    while(n!=0)

    {

        if(n%10==7)

        {

            flg=1;

            cout << "Yes" << endl;

            break;



        }



        n=n/10;



    }



    if(flg==0)

    {

        cout << "No" <<endl;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.3175255692064765x):
#include <stdio.h>



int main()

{

    int op;



    scanf("%d", &op);





    if (op/100 == 7 || op%100/10 == 7 || op%10 == 7){

        printf("Yes");

    }else{

        printf("No");



    }





    return 0;

}