#include <stdio.h>

int main(){
    int num, angka1, angka2, angka3;
    scanf("%d", &num);

    angka1 = num/100;
    angka2 = (num - angka1 * 100)/10;
    angka3 = num % (angka1 * 100 + angka2 * 10);
if(angka1 == 7 || angka2 == 7 || angka3 == 7){
    puts("Yes");
} else{
    puts("No");
}
    return 0;
}
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define Rep(i,s,f) for(int i=(int)s;i<(int)f;i++)
using ll=long long;
using namespace std;


int f(ll a,ll b)
{
	return (int)max(log10(a),log10(b));
}

int main()
{
	ll N;
	cin>>N;
	int ans=10;
	for(int i=1;i<sqrt(N)+1;i++)
	{
		if(N%i!=0) continue;
		ll k=N/i;
		int v=f(i,k);
		ans=min(ans,v);
	}
	cout<<ans+1<<endl;
	return 0;
}
