stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
//----------------------Shanu Garg here---------------------

//-------------Search on youtube : Shanu Garg---------------

//-Studying at National Institute of Technology Delhi(NITD)-

//---------------------From Delhi, India--------------------



#include<bits/stdc++.h>

#include<algorithm>

using namespace std;



#define f(i,n) for(auto i=0;i<n;i++)

#define fr(i,n) for(auto i=n-1;i>=0;i--)

#define fs(i,a,b,c) for(auto i=a;i!=b;i+=c)

#define fl(i,x) for(auto i : x)

#define nl cout<<"\n";

#define chk(x) cout<<#x<<x<<" ", nl

#define ll long long int

#define ull unsigned long long int

#define vi vector<int>

#define vvi vector<vi>

#define pr pair<ll, ll>

#define vii vector<pair<int, int>>

#define vll vector<pr>

#define vl vector<ll>

#define m(a,b) map<a, b>

#define mid(a,b) ((a+b)/2)

#define pb push_back

#define LCM(a,b) ((a*b)/__gcd(x,y))

const int INF = 0x3f3f3f3f, mod = 1e9 + 7;



class triplet{

    ll f, s, t;};



vl in(ll n){vl v;ll x;

    f(i,n)

    cin>>x, v.pb(x);

    return v;}



vll in_pr(ll n){

    vll ar;

    ll x,y;

    f(i,n)

    {cin>>x>>y;

    ar[i]={x,y};

    }

    return ar;

}

void out(vl v, char ch='\0'){

    fl(i,v)

    cout<<i<<ch;

}



void solve(){

    ll N;

    cin>>N;

    bool flag=false;

    for(int i=1;i<10;i++)

    if(N%i == 0)

    if(N/i < 10  &&  N/i > 0)

    flag=true;



    flag ? cout<<"Yes" : cout<<"No";

}



int main(){

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    solve();

   return 0;

}

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



int main(){

    int N;

    scanf("%d", &N);

    int temp = 0;

    for(int i = 1; i <= 9; i++){

        if((double)N / i <= 9 && (double)N / i >= 1 && N % i == 0){

            temp = 1;

            break;

        }

    }

    if(temp == 1){

        puts("Yes");

    }else{

        puts("No");

    }

    return 0;

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

using namespace std;

#define int  long long

#define tc(t)  int t; cin>>t; while(t--)

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

#define endl   "\n"

int32_t main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

 int n;

 cin>>n;

 if(n==0) cout<<"Yes"<<endl;

 else {

     bool flag=true;

     for (int i = 1; i <= 9; i++) {

         if (n % i == 0) {

             int b=n/i;

             if(b>=1&&b<=9) 

             { flag=false;

                 cout<<"Yes"<<endl;

                 break;

             }



         }



     }

     if(flag) cout<<"No"<<endl;

 }



}

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



int main(){

    int N;

    scanf("%d", &N);

    int temp = 0;

    for(int i = 1; i <= 9; i++){

        if((double)N / i <= 9 && (double)N / i >= 1 && N % i == 0){

            temp = 1;

            break;

        }

    }

    if(temp == 1){

        puts("Yes");

    }else{

        puts("No");

    }

    return 0;

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

using namespace std;

int main()

{

    int a,n,i,flag=0,j;

    cin>>n;

    for(i=1;i<=9;i++)

    {

        for(j=1;j<=9;j++)

        {

            if(i*j==n)

               flag=1;

        }

    }

    if(flag==1)

        cout<<"Yes";

    else

        cout<<"No";



}

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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

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



using namespace std;



#define ll long long 

#define endl '\n'

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

#define SIZE 100005



int main()

{

    int a;

    

    cin >> a;

    for(int i = 1; i <= 9; i++)

    {

		if(a%i==0 && a/i>=1 && a/i <= 9) {cout <<"Yes\n";return 0;}

	}

	cout << "No" << endl;

	return 0;

}


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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

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



using namespace std;



int main()

{

    int n=0;

    int x=0;

    cin>>n;

    for(int i=1;i<=9;i++)

    {

        if(x==1)

        {

            break;

        }

        for(int i2=1;i2<=9;i2++)

        {

            if(i*i2==n)

            {

               x++;

               break;

            }

            else

            {

                x=x;

            }

        }

    }

    if(x==1)

    {

        cout<<"Yes";

    }

    else

    {

        cout<<"No";

    }

    return 0;

}


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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

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

#include <cstdio>

#include <cstring>

#include <cstdlib>

#include <algorithm>

using namespace std;



int main()

{

    int n;scanf("%d",&n);

    if(n==1||n==2||n==3||n==4||n==5||n==6||n==7||n==8||n==9||n==10||n==12||n==14||n==15||n==16||n==18||n==20||n==21||n==24||n==25||n==27||n==28||n==30||n==32||n==35||n==36||n==40||n==42||n==45||n==48||n==49||n==54||n==56||n==63||n==64||n==72||n==81)

        printf("Yes\n");

    else

        printf("No\n");

    return 0;

}


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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

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

#include <cstdio>

#include <cstring>

#include <cstdlib>

#include <algorithm>

using namespace std;



int main()

{

    int n;scanf("%d",&n);

    for(int i=1;i<10;i++)

    {

        for(int j=1;j<10;j++)

        {

            if(i*j==n)

            {

                printf("Yes\n");

                return 0;

            }

        }

    }

    printf("No\n");

    return 0;

}

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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

}
// Slower C++ solution:
//-- In The Name of God --

#include<bits/stdc++.h>

using namespace std;





#define      mod     1e9+7

#define      pai     acos(-1)

#define      ff      first

#define      ss      second

#define      ll      long long

#define      pb      push_back

#define      mp      make_pair

#define      endl    "\n"

#define      fii     freopen("input.txt","r",stdin);

#define      foo     freopen("output.txt","w",stdout);

#define      fast    ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);



const   ll   mx=1e5+100;



int main()

{

    fast;

    ll i,j,a,b,c,d,n,m,t;

    cin>>n;

    ll l=1,r=9;

    if(n%1==0||n%2==0||n%3==0||n%4==0||n%5==0||n%6==0||n%7==0||n%8==0||n%9==0)

    {

        if(n%1==0&&((n/1)>=l&&(n/1)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%2==0&&((n/2)>=l&&(n/2)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%3==0&&((n/3)>=l&&(n/3)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%4==0&&((n/4)>=l&&(n/4)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%5==0&&((n/5)>=l&&(n/5)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%6==0&&((n/6)>=l&&(n/6)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%7==0&&((n/7)>=l&&(n/7)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%8==0&&((n/8)>=l&&(n/8)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else if(n%9==0&&((n/9)>=l&&(n/9)<=r))

        {

            cout<<"Yes"<<endl;

        }

        else

        {

            cout<<"No"<<endl;

        }



    }

    else

    {

        cout<<"No"<<endl;

    }

    return 0;

}




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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

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

using namespace std;

int main()

{

    int i,n,m=1;

    cin>>n;

    for(i=1;i<=9;i++)

    {

        if(!(n%i)&&(n/i>=1&&n/i<=9))

        {

            puts("Yes");

            m=0;

            break;



        }

    }

    if(m)

        puts("No");

    return 0;

}


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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

}
// Slower C++ solution:
//----------------------Shanu Garg here---------------------

//-------------Search on youtube : Shanu Garg---------------

//-Studying at National Institute of Technology Delhi(NITD)-

//---------------------From Delhi, India--------------------



#include<bits/stdc++.h>

#include<algorithm>

using namespace std;



#define f(i,n) for(auto i=0;i<n;i++)

#define fr(i,n) for(auto i=n-1;i>=0;i--)

#define fs(i,a,b,c) for(auto i=a;i!=b;i+=c)

#define fl(i,x) for(auto i : x)

#define nl cout<<"\n";

#define chk(x) cout<<#x<<x<<" ", nl

#define ll long long int

#define ull unsigned long long int

#define vi vector<int>

#define vvi vector<vi>

#define pr pair<ll, ll>

#define vii vector<pair<int, int>>

#define vll vector<pr>

#define vl vector<ll>

#define m(a,b) map<a, b>

#define mid(a,b) ((a+b)/2)

#define pb push_back

#define LCM(a,b) ((a*b)/__gcd(x,y))

const int INF = 0x3f3f3f3f, mod = 1e9 + 7;



class triplet{

    ll f, s, t;};



vl in(ll n){vl v;ll x;

    f(i,n)

    cin>>x, v.pb(x);

    return v;}



vll in_pr(ll n){

    vll ar;

    ll x,y;

    f(i,n)

    {cin>>x>>y;

    ar[i]={x,y};

    }

    return ar;

}

void out(vl v, char ch='\0'){

    fl(i,v)

    cout<<i<<ch;

}



void solve(){

    ll N;

    cin>>N;

    bool flag=false;

    for(int i=1;i<10;i++)

    if(N%i == 0)

    if(N/i < 10  &&  N/i > 0)

    flag=true;



    flag ? cout<<"Yes" : cout<<"No";

}



int main(){

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    solve();

   return 0;

}

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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

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

using namespace std;

#define int  long long

#define tc(t)  int t; cin>>t; while(t--)

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

#define endl   "\n"

int32_t main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

 int n;

 cin>>n;

 if(n==0) cout<<"Yes"<<endl;

 else {

     bool flag=true;

     for (int i = 1; i <= 9; i++) {

         if (n % i == 0) {

             int b=n/i;

             if(b>=1&&b<=9) 

             { flag=false;

                 cout<<"Yes"<<endl;

                 break;

             }



         }



     }

     if(flag) cout<<"No"<<endl;

 }



}

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



int main () {

	int n;

	scanf("%d", &n);

	

	int count = 0;

	for (int i = 1; i < 10; i++) {

		for (int j = 1; j < 10; j++) {

			if (i * j == n) {

				count++;

			}

		}

	}

	

	if (count == 0) {

		puts("No");

	}

	else {

		puts("Yes");

	}

	

	return 0;

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

using namespace std;



int main() {

	int r;

	bool band=false;

	cin>>r;

	for (int a=1; a<10;a++) {

		for (int b=1; b<10;b++) {

			if (a*b==r)

				band=true;

		}

	}

	if (band)

		cout<<"Yes";

	else

		cout<<"No";

	return 0;

}

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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;



int n;



int main(){

    cin>>n;

    bool valid=false;

    for(int i=1;i<=9;i++){

        for(int j=1;j<=9;j++){

            if(i*j==n){

                valid=true;

            }

        }

    }

    if(valid){

        cout<<"Yes"<<endl;

    }else{

        cout<<"No"<<endl;

    }

}

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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;

int main()

{

    long long int n,m,flag=0,i;

    cin>>n;

    for(i=9;i>0;i--)

    {

        if(n%i==0)

        {

            m=n/i;

            if(m>=1&&m<=9)

            {

                flag=1;

                break;

            }

        }

    }

    if(flag==1) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;

    return 0;

}




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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;

int main()

{

    int n,Count=0;

    cin>>n;

    for(int a=1; a<=9; ++a)

    {

        for(int b=1; b<=9; ++b)

        {

            if(a*b==n)

            {

                Count++;

            }

        }

    }

    if(Count==0)

    {

        cout<<"No"<<endl;

    }

    else

    {

        cout<<"Yes"<<endl;

    }

    return 0;

}


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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;

int main()

{

    int n,flag=0,a=0,b=0;

    cin>>n;

    flag=0;

    for(int i=1; i<10; i++)

    {

        if(n%i==0)

        {

            a=n/i;

            b=i;



            if((a>=1&&a<=9)&&(b>=1&&b<=9))

            {

                cout<<"Yes"<<endl;

                flag=1;

                break;



            }

        }

        else continue;

    }

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



}


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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;



typedef long long ll;

#define mp make_pair

#define pb push_back

#define pi pair<ll,ll>

#define ff first

#define ss second

#define MAX 100005

const ll MOD = 1000000007;



int main(){

	ios_base::sync_with_stdio(0); cin.tie(0);



	int t=1;

//	cin>>t;

	while(t--){

		int n;

		cin>>n;

		

		for(int i=1;i<=9;i++)

		{

			for(int j=1;j<=9;j++)

			{

				if(i*j==n)

			    {

			    	cout<<"Yes\n";

			    	return 0;

				}

			}

		}

		cout<<"No\n";

	 

	}		

}

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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

}
// Slower C++ solution:
///in the name of ALLAH

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main()

{

  //  ll p=100;

    //while(p--){

    ll t;

    cin>>t;

    bool f=0;

    for(int i=1;i<=9;i++)

    {

        if(t%i==0)

        {

            if(t/i>=1 && t/i<=9)

            {

                f=1;break;

            }

        }

    }

    if(f==1)

        cout<<"Yes"<<endl;

    else

        cout<<"No"<<endl;

}








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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;

#define ll long long



int main(){

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);



    int n;

    cin>>n;

    for(int i = 1;i<= 9; i++){

        for(int j = 1; j <= 9; j++){

            if(i*j == n){

                cout<<"Yes"<<endl;

                return 0;

            }

        }

    }

    cout<<"No"<<endl;



    return 0;

}

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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		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 flag = 0;



for(int i=1 ; i<=9 ; i++){

    int div;

    if(n%i==0){

        div = n/i;

        if(div>=1 && div<=9)

            flag = 1;

    }

}



if(flag) cout<<"Yes"<<endl;

else cout<<"No"<<endl;



}


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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

}
// Slower C++ solution:
///Bismillahir Rahmanir Rahim

#include<bits/stdc++.h>

using namespace std;

#define     FAST        ios_base::sync_with_stdio(false);cin.tie(NULL)

#define     int 	    long long

#define 	pb 	        push_back

#define 	mp 	        make_pair

#define 	pi 	        2*acos(0.0)

#define     scan(i)     scanf("%lld",&i)

#define     scann(i,j)  scanf("%lld%lld",&i,&j)

#define     print(i)    printf("%lld\n",i)

#define     printt(i,j) printf("%lld %lld\n",i,j)

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

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

#define 	vect 	    vector<int>

#define 	vec_it 	    vector<int>::reverse_iterator vi

#define     sorta(v)    sort(v.begin(),v.end())

#define     sortd(v)    sort(v.begin(),v.end(),greater<>())

#define     sorted      is_sorted(v.begin(),v.end())

#define 	mapp 	    map<char,int>

#define 	pairr 	    pair<int,int>

#define 	sett	    set<int>

#define 	set_it 	    set<int>::reverse_iterator si

#define     map_it      map<char,int> :: reverse_iterator mi

#define 	yes 	    cout<<"Yes"<<endl

#define 	no 	        cout<<"No"<<endl

#define 	ff 	        first

#define 	ss 	        second

#define     mx          INT_MAX

#define     lmx         LLONG_MAX

#define     mn          INT_MIN

#define     lmn         LLONG_MIN

#define     GCD         __gcd(a,b)

#define     LCM         (a/GCD)*b

template <typename T> T gcd(T a,T b){return (b==0)?a:gcd(b,a%b);}

template <typename T> T lcm(T a,T b) {return a*(b/gcd(a,b));}

int modulo (int a, int b) { return a >= 0 ? a % b : ( b - abs ( a%b ) ) % b; }



void solve()

{

  //  freopen ("(input).txt" , "r",  stdin) ;

  //  string st,stt ;

  //  int low=0,high=0;

  //  int l=0,r;

    int n,k,t,x,y,z,d=0,temp=0,cnt=0,sum=0,f=0;

    cin>>n  ; vect v ,a ,b  ; sett s ; set_it ; mapp m,mm ;  map_it ; pairr p ;

    for(int i=1;i*i<=n;i++)

    {

        if(n%i==0&&i<10&&(n/i)<10)

            temp=1;

    }

    if(temp&1)

        yes;

    else

        no;



}



main()

{

    int t;

  //  cin>>t;

  //  while(t--)

        solve();

}




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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;

int main()

{

    long long int sum=0,i,j,n,p,x1=0,flag=0;

    cin>>n;

    p=sqrt(n);

    for(i=1; i<=p; i++)

    {

        if(n%i==0 && i<10 && (n/i)<10)

        {

            flag=1;

            break;

        }

    }

    if(flag==1)

    {

        cout<<"Yes";

    }

    else

        cout<<"No";

    }


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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		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;

for(int i = 1;i<=9;i++)

{

for(int j =1;j<=9;j++)

{

if(i*j==n){

cout<<"Yes"<<endl;

return 0;}

}

}

cout<<"No"<<endl;

}

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



int main(){

	int n;

	scanf("%d", &n);

	int flag = 0;



	for (int i=1; i<10; i++){

		for (int j=i; j<10; j++){

			if (i*j == n){

				flag = 1;

				break;

			}

		}

		if (flag){

			break;

		}

	}



	if (flag){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	

	return 0;

}