#include<bits/stdc++.h>
using namespace std;

#define           CIN              ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define           ll               long long int
#define           ull              unsigned long long int
#define           pii              pair < int, char>
#define           pll              pair < ull, ull>
#define           MOD              1000000007
#define           vi               vector<int>
#define           vl               vector<ll>
#define           pb               push_back
#define           sc               scanf
#define           pf               printf
#define         scin(x)            scanf("%d",&(x))
#define        scin2(x,y)          scanf("%d %d",&(x),&(y))
#define         scln(x)            scanf("%lld",&(x))
#define        scln2(x,y)          scanf("%lld %lld",&(x),&(y))
#define       min3(a,b,c)          min(a,min(b,c))
#define       min4(a,b,c,d)        min(d,min(a,min(b,c)))
#define       max3(a,b,c)          max(a,max(b,c))
#define       max4(a,b,c,d)        max(d,max(a,max(b,c)))
#define         ms(a,b)            memset(a,b,sizeof(a))
//#define           mp               make_pair
#define       gcd(a, b)            __gcd(a,b)
#define       lcm(a, b)            ((a)*(b)/gcd(a,b))
#define         input              freopen("input.txt","rt", stdin)
#define         output             freopen("output.txt","wt", stdout)
//#define           PI               2*acos(0.0)
#define     rep( i , a , b )       for( i=a ; i<b ; i++)
#define     rev( i , a , b )       for( i=a ; i>=b ; i--)
#define     repx( i ,a,b, x)       for( i=a ; i<b ; i+=x)
#define       CASEL(t)             printf("Case %d:\n",t)
#define     RUN_CASE(t,T)          for(__typeof(t) t=1;t<=T;t++)

///priority_queue<int,vector<int>,greater<int> >pq;
///--------------Graph Moves--------------------------------------
///const int fx[] = {+1,-1,+0,+0};
///const int fy[] = {+0,+0,+1,-1};
///const int fx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's move
///const int fy[] = {-1,+1,+0,+0,+1,+1,-1,-1}; ///king's Move
///const int fx[] = {-2,-2,-1,-1,+1,+1,+2,+2}; ///knight's move
///const int fy[] = {-1,+1,-2,+2,-2,+2,-1,+1}; ///knight's move
///--------------------------------------------------------------

vector<int>v;
int main()
{
    ll a,b,i,g=0,c,s;
    cin>>a>>b;
    for(i=0; i<a; i++)
    {
        cin>>c;
        v.push_back(c);
    }

    for(i=1; i<a; i++)
    {
        s=v[i]-v[i-1];
        g=__gcd(s,g);
    }
    for(i=0; i<b; i++)
    {
        cin>>c;
        if(g%c==0){
            cout<<"YES\n";
            cout<<v[0]<<" "<<i+1;
            return 0;
        }
    }
    cout<<"NO\n";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define           CIN              ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define           ll               long long int
#define           ull              unsigned long long int
#define           pii              pair < int, char>
#define           pll              pair < ull, ull>
#define           MOD              1000000007
#define           vi               vector<int>
#define           vl               vector<ll>
#define           pb               push_back
#define           sc               scanf
#define           pf               printf
#define         scin(x)            scanf("%d",&(x))
#define        scin2(x,y)          scanf("%d %d",&(x),&(y))
#define         scln(x)            scanf("%lld",&(x))
#define        scln2(x,y)          scanf("%lld %lld",&(x),&(y))
#define       min3(a,b,c)          min(a,min(b,c))
#define       min4(a,b,c,d)        min(d,min(a,min(b,c)))
#define       max3(a,b,c)          max(a,max(b,c))
#define       max4(a,b,c,d)        max(d,max(a,max(b,c)))
#define         ms(a,b)            memset(a,b,sizeof(a))
//#define           mp               make_pair
#define       gcd(a, b)            __gcd(a,b)
#define       lcm(a, b)            ((a)*(b)/gcd(a,b))
#define         input              freopen("input.txt","rt", stdin)
#define         output             freopen("output.txt","wt", stdout)
//#define           PI               2*acos(0.0)
#define     rep( i , a , b )       for( i=a ; i<b ; i++)
#define     rev( i , a , b )       for( i=a ; i>=b ; i--)
#define     repx( i ,a,b, x)       for( i=a ; i<b ; i+=x)
#define       CASEL(t)             printf("Case %d:\n",t)
#define     RUN_CASE(t,T)          for(__typeof(t) t=1;t<=T;t++)

///priority_queue<int,vector<int>,greater<int> >pq;
///--------------Graph Moves--------------------------------------
///const int fx[] = {+1,-1,+0,+0};
///const int fy[] = {+0,+0,+1,-1};
///const int fx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's move
///const int fy[] = {-1,+1,+0,+0,+1,+1,-1,-1}; ///king's Move
///const int fx[] = {-2,-2,-1,-1,+1,+1,+2,+2}; ///knight's move
///const int fy[] = {-1,+1,-2,+2,-2,+2,-1,+1}; ///knight's move
///--------------------------------------------------------------

vector<ll>v;
int main()
{
    ll a,b,i,g=0,c,s;
    cin>>a>>b;
    for(i=0; i<a; i++)
    {
        cin>>c;
        v.push_back(c);
    }

    for(i=1; i<a; i++)
    {
        s=v[i]-v[i-1];
        g=lcm(s,g);
    }
    for(i=0; i<b; i++)
    {
        cin>>c;
        if(g%c==0){
            cout<<"YES\n";
            cout<<v[0]<<" "<<i+1;
            return 0;
        }
    }
    cout<<"NO\n";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define           CIN              ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define           ll               long long int
#define           ull              unsigned long long int
#define           pii              pair < int, char>
#define           pll              pair < ull, ull>
#define           MOD              1000000007
#define           vi               vector<int>
#define           vl               vector<ll>
#define           pb               push_back
#define           sc               scanf
#define           pf               printf
#define         scin(x)            scanf("%d",&(x))
#define        scin2(x,y)          scanf("%d %d",&(x),&(y))
#define         scln(x)            scanf("%lld",&(x))
#define        scln2(x,y)          scanf("%lld %lld",&(x),&(y))
#define       min3(a,b,c)          min(a,min(b,c))
#define       min4(a,b,c,d)        min(d,min(a,min(b,c)))
#define       max3(a,b,c)          max(a,max(b,c))
#define       max4(a,b,c,d)        max(d,max(a,max(b,c)))
#define         ms(a,b)            memset(a,b,sizeof(a))
//#define           mp               make_pair
#define       gcd(a, b)            __gcd(a,b)
#define       lcm(a, b)            ((a)*(b)/gcd(a,b))
#define         input              freopen("input.txt","rt", stdin)
#define         output             freopen("output.txt","wt", stdout)
//#define           PI               2*acos(0.0)
#define     rep( i , a , b )       for( i=a ; i<b ; i++)
#define     rev( i , a , b )       for( i=a ; i>=b ; i--)
#define     repx( i ,a,b, x)       for( i=a ; i<b ; i+=x)
#define       CASEL(t)             printf("Case %d:\n",t)
#define     RUN_CASE(t,T)          for(__typeof(t) t=1;t<=T;t++)

///priority_queue<int,vector<int>,greater<int> >pq;
///--------------Graph Moves--------------------------------------
///const int fx[] = {+1,-1,+0,+0};
///const int fy[] = {+0,+0,+1,-1};
///const int fx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's move
///const int fy[] = {-1,+1,+0,+0,+1,+1,-1,-1}; ///king's Move
///const int fx[] = {-2,-2,-1,-1,+1,+1,+2,+2}; ///knight's move
///const int fy[] = {-1,+1,-2,+2,-2,+2,-1,+1}; ///knight's move
///--------------------------------------------------------------

vector<ll>v;
int main()
{
    ll a,b,i,g=0,c,s;
    cin>>a>>b;
    for(i=0; i<a; i++)
    {
        cin>>c;
        v.push_back(c);
    }

    for(i=1; i<a; i++)
    {
        s=v[i]-v[i-1];
        g=__gcd(s,g);
    }
    for(i=0; i<b; i++)
    {
        cin>>c;
        if(g%c==0){
            cout<<"YES\n";
            cout<<v[0]<<" "<<i+1;
            return 0;
        }
    }
    cout<<"NO\n";

    return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(ll x, ll y)
{
	if (x == y)
		return x;
	else if (x > y)
	{

		ll p = x / y;
		if (x%y == 0)
			return y;
		return gcd(x - p*y, y);
	}
	else
	{
		ll p = y / x;
		if (y%x == 0)
			return x;
		return gcd(x, y - p*x);
	}
}

ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++)
		q = gcd(x[i]-x[i-1], q);
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(int a, int b)
{

	if (b == 0) {
		return a;
	}
	else {
		return gcd(b, a % b);
	}
}

ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++)
		q = gcd(x[i]-x[i-1], q);
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(ll x, ll y)

{
	if (x == y)
		return x;
	else if (x > y)
		return gcd(x - y, y);
	return gcd(x, y - x);
}
ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++)
		q = gcd(x[i]-x[i-1], q);
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(int a, int b)
{
	if (b == 0) {
		return a;
	}
	else {
		return gcd(b, a % b);
	}
}

ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++) {
		ll k = gcd(x[i] - x[i - 1], q);
			q = k;
	}
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(ll x, ll y)

{
	if (x == y)
		return x;
	else if (x > y)
		return gcd(x - y, y);
	return gcd(x, y - x);
}
ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++)
		q = gcd(x[i]-x[i-1], q);
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(ll x, ll y)
{
	if (x == y)
		return x;
	else if (x > y)
	{
		ll p = x / y;
		p -- ;
		if (p == 0)
			p=1;
		return gcd(x - p*y, y);
	}
	else
	{
		ll p = y / x;
		p--;
		if (p == 0)
			p=1;
		return gcd(x, y - p*x);
	}
}

ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++)
		q = gcd(x[i]-x[i-1], q);
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(ll x, ll y)
{
	if (x == y)
		return x;
	else if (x > y)
	{
		if (x%y == 0)
			return y;
		ll p = x / y;
		if (p == 0)
			p++;
		return gcd(x - p*y, y);
	}
	else
	{
		if (y%x == 0)
			return x;
		ll p = y / x;
		if (p == 0)
			p++;
		return gcd(x, y - p*x);
	}
}

ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++)
		q = gcd(x[i]-x[i-1], q);
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

int gcd(ll x, ll y)

{
	if (x == y)
		return x;
	else if (x > y)
		return gcd(x - y, y);
	return gcd(x, y - x);
}
ll n, i, j, m, q, x[1000005], p[100005], g[100005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	for (i = 2; i < n; i++)
		g[i] = gcd(x[i]-x[i-1], x[i + 1]-x[i]);
	q = g[2];
	for (i = 2; i < n; i++)
		q = gcd(g[i], q);
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
typedef long long ll;
#define m_p make_pair
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define stop_baby system("pause")
using namespace std;

ll gcd(ll a, ll b)
{
	if (b == 0) {
		return a;
	}
	else {
		return gcd(b, a % b);
	}
}

ll n, i, j, m, q, x[300005], p[300005];
int main()
{
	fast;
	cin >> n >> m;
	for (i = 1; i <= n; i++)
		cin >> x[i];
	for (j = 1; j <= m; j++)
		cin >> p[j];
	q = x[2] - x[1];
	for (i = 2; i <= n; i++) {
		ll k = gcd(x[i] - x[i - 1], q);
			q = k;
	}
	for (j = 1; j <= m; j++)
		if (q%p[j]==0)break;
	if (j != m + 1)
	{
		cout << "YES" << endl;
		cout << x[1] << " " << j << endl;
	}
	else
		cout << "NO" << endl;
//	stop_baby;
	return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
long int n,m,c=0,i,j,k,y;
long long int x[300001],p[300001],cp[300001];
int main()
{
    for(cin>>n>>m;i<n;i++)
    {
        cin>>x[i];
    }
    for(i=0;i<m;i++)
    {
        cin>>p[i];
        cp[i]=p[i];
    }
    sort(p,p+m);
    for(i=0;i<m;i++)
    {
        for(j=0;j<n-1;j++)
        {
             if((x[j+1]-x[j])%p[i]!=0)
                break;
             else c++;
        }
        if(c==n-1)
        {
            for(k=0;k<m;k++)
            {
                if(cp[k]==p[i])
                    y=k+1;
            }
            cout<<"YES"<<endl<<x[0]<<" "<<y;
            y=1;
            break;
        }
        c=0;
    }
    if(y==0)
        cout<<"NO";
    return 0;
}


#include<iostream>
using namespace std;
long int n,m,c=0,y=0,i,j;
long long int x[300001],p[300001],diff[300000];
int main()
{
    for(cin>>n>>m;i<n;i++)
    {
        cin>>x[i];
    }
    for(i=0;i<m;i++)
    {
        cin>>p[i];
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<n-1;j++)
        {
             if(diff[j]%p[i]!=0)
                break;
             else c++;
        }
        if(c==n-1)
        {
            cout<<"YES"<<endl<<x[0]<<" "<<i+1;
            y=1;
            break;
        }
        c=0;
    }
    if(y==0)
        cout<<"NO";
    return 0;
}


#include<iostream>
#include<algorithm>
#include<bits/stdc++.h>
#include<math.h>
using namespace std;
long long   int n,m,i=1,j,gc;
long long int x[300001],p[300001],d[300000];
int main()
{
    for(cin>>n>>m>>x[0];i<n;i++)
    {
        cin>>x[i];
        d[i-1]=x[i]-x[i-1];
    }
    for(i=0;i<m;i++)
    {
        cin>>p[i];
    }
    gc= __gcd(d[0],d[1]);
    for(i=1;i<n;i++)
    {
        gc= __gcd(gc,d[i]);
    }
    for(i=0;i<m;i++)
    {
        if(gc%p[i]==0)
        {
            cout<<"YES"<<endl<<x[0]<<" "<<i+1;
            return 0;
        }
    }
    cout<<"NO";
    return 0;
}


#include<iostream>
using namespace std;
long int n,m,c=0,y=0,i,j;
long long int x[300001],p[300001];
int main()
{
    cin>>n>>m;
    for(i=0;i<n;i++)
    {
        cin>>x[i];
    }
    for(i=0;i<m;i++)
    {
        cin>>p[i];
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<n-1;j++)
        {
             if((x[j+1]-x[j])%p[i]!=0)
                break;
             else c++;
        }
        if(c==n-1)
        {
            cout<<"YES"<<endl<<x[0]<<" "<<i+1;
            y=1;
            break;
        }
        c=0;
    }
    if(y==0)
        cout<<"NO";
    return 0;
}


#include<iostream>
#include<algorithm>
#include<bits/stdc++.h>
#include<math.h>
using namespace std;
long long   int n,m,c=0,i=1,j,k,gc;
long long int x[300001],p[300001],cp[300001],d[300000];
int main()
{
    for(cin>>n>>m>>x[0];i<n;i++)
    {
        cin>>x[i];
        d[i-1]=x[i]-x[i-1];
    }
    for(i=0;i<m;i++)
    {
        cin>>p[i];
        cp[i]=p[i];

    }
    sort(p,p+m);
    gc= __gcd(d[i],d[i+1]);
    for(i=1;i<n;i++)
    {
        gc= __gcd(gc,d[i]);
    }
    for(i=0;i<m;i++)
    {
        if(gc%cp[i]==0)
        {
            cout<<"YES"<<endl<<x[0]<<" "<<i+1;
            return 0;
        }
    }
    cout<<"NO";
    return 0;
}


#include<iostream>
using namespace std;
long int n,m,c=0,y=0,i,j;
long long int x[300001],p[300001];
int main()
{
    cin>>n>>m;
    for(i=0;i<n;i++)
    {
        cin>>x[i];
    }
    for(i=0;i<m;i++)
    {
        cin>>p[i];
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<n-1;j++)
        {
             if((x[j+1]-x[j])%p[i]!=0)
                break;
             else c++;
        }
        if(c==n-1)
        {
            cout<<"YES"<<endl<<x[0]<<" "<<p[i];
            y=1;
            break;
        }
        c=0;
    }
    if(y==0)
        cout<<"NO";
    return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
long int n,m,c=0,y=0,i,j;
long long int x[300001],p[300001];
int main()
{
    for(cin>>n>>m;i<n;i++)
    {
        cin>>x[i];
    }
    for(i=0;i<m;i++)
    {
        cin>>p[i];
    }
    sort(p,p+m);
    for(i=0;i<m;i++)
    {
        for(j=0;j<n-1;j++)
        {
             if((x[j+1]-x[j])%p[i]!=0)
                break;
             else c++;
        }
        if(c==n-1)
        {
            cout<<"YES"<<endl<<x[0]<<" "<<i+1;
            y=1;
            break;
        }
        c=0;
    }
    if(y==0)
        cout<<"NO";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
 long long int ar[400009],br[400009];
int main()
{
     long long int a,b,c,i,j,k=0,k1=0,d,g=0,h=0,v=0,gcd=0;
    cin>>a>>b;
    for(i=1; i<=a; i++)
    {
        cin>>ar[i];
    }
    for(j=1;j<=b;j++)
    {
        cin>>br[j];
    }
    for(i=2;i<=a;i++)
    {
        gcd=__gcd(gcd,ar[i]-ar[i-1]);
    }
   // cout<<gcd;
    for(j=1;j<=b;j++)
    {
        if(gcd%br[j]==0)
        {
            cout<<"YES"<<endl<<gcd<<" "<<j;
            return 0;
        }
    }
    cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
long long int ar[400009],br[400009];
int main()
{
    long long int a,b,c,i,j,k=0,k1=0,d,g=0,h=0,v=0,gcd=0;
    cin>>a>>b;
    for(i=1; i<=a; i++)
    {
        cin>>ar[i];
    }
    for(j=1; j<=b; j++)
    {
        cin>>br[j];
    }
    gcd=ar[2]-1;
    for(i=3; i<=a; i++)
    {
        gcd=__gcd(gcd,ar[i]-ar[i-1]);
    }
    //cout<<gcd;
    for(j=1; j<=b; j++)
    {
        if(gcd%br[j]==0)
        {
            cout<<"YES"<<endl<<gcd<<" "<<j;
            return 0;
        }
    }
    cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
 long long int ar[400009],br[400009];
int main()
{
     long long int a,b,c,i,j,k=0,k1=0,d,g=0,h=0,v=0,gcd=0;
    cin>>a>>b;
    for(i=1; i<=a; i++)
    {
        cin>>ar[i];
    }
    for(j=1;j<=b;j++)
    {
        cin>>br[j];
    }
    for(i=1;i<=a;i++)
    {
        gcd=__gcd(gcd,ar[i]);
    }
   // cout<<gcd;
    for(j=1;j<=b;j++)
    {
        if(gcd%br[j]==0)
        {
            cout<<"YES"<<endl<<gcd<<" "<<j;
            return 0;
        }
    }
    cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
long long int ar[400009],br[400009];
int main()
{
    long long int a,b,c,i,j,k=0,k1=0,d,g=0,h=0,v=0,gcd=0,mn;
    cin>>a>>b;
    for(i=1; i<=a; i++)
    {
        cin>>ar[i];
       // mn=min(mn,ar[i]);
    }
    mn=ar[1];
    for(i=1; i<=a; i++)
    {
        //cin>>ar[i];
        mn=min(mn,ar[i]);
    }
    for(j=1; j<=b; j++)
    {
        cin>>br[j];
    }
    gcd=ar[2]-ar[1];
    for(i=3; i<=a; i++)
    {
        gcd=__gcd(gcd,ar[i]-ar[i-1]);
    }
    //cout<<gcd;
    for(j=1; j<=b; j++)
    {
        if(gcd%br[j]==0)
        {
            cout<<"YES"<<endl<<mn<<" "<<j;
            return 0;
        }
    }
    cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
 long long int ar[400009],br[400009];
int main()
{
     long long int a,b,c,i,j,k=0,k1=0,d,g=0,h=0,v=0,gcd=0;
    cin>>a>>b;
    for(i=1; i<=a; i++)
    {
        cin>>ar[i];
    }
    for(j=1;j<=b;j++)
    {
        cin>>br[j];
    }
    gcd=__gcd(gcd,ar[1]);
    for(i=2;i<=a;i++)
    {
        gcd=__gcd(gcd,ar[i]-ar[i-1]);
    }
    //cout<<gcd;
    for(j=1;j<=b;j++)
    {
        if(gcd%br[j]==0)
        {
            cout<<"YES"<<endl<<gcd<<" "<<j;
            return 0;
        }
    }
    cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
long long int ar[400009],br[400009];
int main()
{
    long long int a,b,c,i,j,k=0,k1=0,d,g=0,h=0,v=0,gcd=0;
    cin>>a>>b;
    for(i=1; i<=a; i++)
    {
        cin>>ar[i];
    }
    for(j=1; j<=b; j++)
    {
        cin>>br[j];
    }
    gcd=ar[2]-ar[1];
    for(i=3; i<=a; i++)
    {
        gcd=__gcd(gcd,ar[i]-ar[i-1]);
    }
    //cout<<gcd;
    for(j=1; j<=b; j++)
    {
        if(gcd%br[j]==0)
        {
            cout<<"YES"<<endl<<gcd<<" "<<j;
            return 0;
        }
    }
    cout<<"NO";
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        /*if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[k]<<endl;
            return 0;
        }*/
        int flag=0;
        long long int ans=0;
        for(long long int i=1;i<=sqrt(g);i++)
        {
            if(g%i==0)
            {
                if(mp.find(i)!=mp.end())
                {
                    ans=i;
                    flag=1;
                    break;
                }
            }
        }
        if(flag==0)
        {
            cout<<"NO"<<endl;
            return 0;
        }
        else
        {
            if((arr[0]-ans)%ans!=0)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            cout<<"YES"<<endl;
            cout<<ans<<" "<<mp[ans]<<endl;
            return 0;
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=0;
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]-v[0]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<min(arr[0],g)<<" "<<mp[k]<<endl;
            return 0;
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        /*if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[k]<<endl;
            return 0;
        }*/
        int flag=0;
        long long int ans=0;
        for(long long int i=1;i<=sqrt(g);i++)
        {
            if(g%i==0)
            {
                if(mp.find(i)!=mp.end())
                {
                    ans=i;
                    flag=1;
                    break;
                }
            }
        }
        if(flag==0)
        {
            cout<<"NO"<<endl;
            return 0;
        }
        else
        {
            int ffl=0;
            long long int play=-1;
            for(long long int i=1;i<=ans;i++)
            {
                ffl=0;
                for(long long int j=0;j<n;j++)
                {
                    if((arr[j]-i)%ans!=0)
                    {
                        ffl=1;
                        break;
                    }
                }
                if(ffl==0)
                {
                    play=i;
                    break;
                }
            }
            if(play==-1)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            else
            {
                cout<<"YES"<<endl;
                cout<<play<<" "<<mp[ans]<<endl;
                return 0;
            }
            /*if((arr[0]-ans)%ans!=0)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            cout<<"YES"<<endl;
            cout<<ans<<" "<<mp[ans]<<endl;
            return 0;*/
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    for(int i=1;i<v.size();i++)
    {
        v[i]=v[i]-v[0];
    }
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<min(arr[0],g)<<" "<<1<<endl;
            return 0;
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    for(int i=1;i<v.size();i++)
    {
        v[i]=v[i]-v[0];
    }
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        cout<<"NO"<<endl;
        return 0;
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[k]<<endl;
            return 0;
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        /*if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[k]<<endl;
            return 0;
        }*/
        int flag=0;
        long long int ans=0;
        vector<long long int> pp;
        for(long long int i=1;i<=sqrt(g);i++)
        {
            if(g%i==0)
            {
                if(mp.find(i)!=mp.end())
                {
                    ans=i;
                    flag=1;
                    pp.push_back(i);
                    //break;
                }
            }
        }
        if(flag==0)
        {
            cout<<"NO"<<endl;
            return 0;
        }
        else
        {
            int fll=0;
            int ggg=0;
            long long int answer=-1;
            long long int op=-1;
            for(long long int i=0;i<pp.size();i++)
            {
                for(long long int j=1;j<=pp[i];j++)
                {
                    ggg=0;
                    for(long long int k=0;k<n;k++)
                    {
                        if((arr[k]-j)%pp[i]!=0)
                        {
                            break;
                        }
                    }
                    if(ggg==0)
                    {
                        answer=j;
                        op=i;
                        fll=1;
                        break;
                    }
                }
                if(fll)
                {
                    break;
                }
            }
            if(fll==0)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            else
            {
                cout<<"YES"<<endl;
                cout<<answer<<" "<<mp[pp[op]]<<endl;
                return 0;
            }
            /*int ffl=0;
            long long int play=-1;
            for(long long int i=1;i<=ans;i++)
            {
                ffl=0;
                for(long long int j=0;j<n;j++)
                {
                    if((arr[j]-i)%ans!=0)
                    {
                        ffl=1;
                        break;
                    }
                }
                if(ffl==0)
                {
                    play=i;
                    break;
                }
            }
            if(play==-1)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            else
            {
                cout<<"YES"<<endl;
                cout<<play<<" "<<mp[ans]<<endl;
                return 0;
            }*/
            /*if((arr[0]-ans)%ans!=0)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            cout<<"YES"<<endl;
            cout<<ans<<" "<<mp[ans]<<endl;
            return 0;*/
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        mp[val]=(i+1);
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        cout<<"NO"<<endl;
        return 0;
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<arr[0]<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    long long int g=0;
    for(long long int i=0;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    long long int val;
    for(long long int i=1;i<=m;i++)
    {
        cin>>val;
        if(g%val==0)
        {
            cout<<"YES"<<endl<<arr[0]<<" "<<i<<endl;
            return 0;
        }
    }
    cout<<"NO"<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int hh=1;
    if(mp.find(hh)!=mp.end())
    {
        cout<<"YES"<<endl;
        cout<<1<<" "<<mp[hh]<<endl;
        return 0;
    }
    long long int g=0;
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]-v[0]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        /*if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[k]<<endl;
            return 0;
        }*/
        int flag=0;
        long long int ans=0;
        vector<long long int> pp;
        for(long long int i=1;i<=sqrt(g);i++)
        {
            if(g%i==0)
            {
                if(mp.find(i)!=mp.end())
                {
                    ans=i;
                    flag=1;
                    pp.push_back(i);
                    //break;
                }
            }
        }
        if(flag==0)
        {
            cout<<"NO"<<endl;
            return 0;
        }
        else
        {
            int fll=0;
            int ggg=0;
            long long int answer=-1;
            long long int op=-1;
            for(long long int i=0;i<pp.size();i++)
            {
                for(long long int j=1;j<=pp[i];j++)
                {
                    ggg=0;
                    for(long long int k=0;k<n;k++)
                    {
                        if((arr[k]-j)%pp[i]!=0)
                        {
                            break;
                        }
                    }
                    if(ggg==0)
                    {
                        answer=j;
                        op=i;
                        fll=1;
                        break;
                    }
                }
                if(fll)
                {
                    break;
                }
            }
            if(fll==0)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            else
            {
                cout<<"YES"<<endl;
                cout<<answer<<" "<<mp[pp[op]]<<endl;
                return 0;
            }
            /*int ffl=0;
            long long int play=-1;
            for(long long int i=1;i<=ans;i++)
            {
                ffl=0;
                for(long long int j=0;j<n;j++)
                {
                    if((arr[j]-i)%ans!=0)
                    {
                        ffl=1;
                        break;
                    }
                }
                if(ffl==0)
                {
                    play=i;
                    break;
                }
            }
            if(play==-1)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            else
            {
                cout<<"YES"<<endl;
                cout<<play<<" "<<mp[ans]<<endl;
                return 0;
            }*/
            /*if((arr[0]-ans)%ans!=0)
            {
                cout<<"NO"<<endl;
                return 0;
            }
            cout<<"YES"<<endl;
            cout<<ans<<" "<<mp[ans]<<endl;
            return 0;*/
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        /*if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[k]<<endl;
            return 0;
        }*/
        int flag=0;
        long long int ans=0;
        for(long long int i=1;i<=sqrt(g);i++)
        {
            if(g%i==0)
            {
                if(mp.find(i)!=mp.end())
                {
                    ans=i;
                    flag=1;
                    break;
                }
            }
        }
        if(flag==0)
        {
            cout<<"NO"<<endl;
            return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<min(arr[0],ans)<<" "<<mp[ans]<<endl;
            return 0;
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    for(int i=1;i<v.size();i++)
    {
        v[i]=v[i]-v[0];
    }
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        mp[val]=(i+1);
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        cout<<"NO"<<endl;
        return 0;
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<arr[0]<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    for(int i=1;i<v.size();i++)
    {
        v[i]=v[i]-v[0];
    }
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<min(arr[0],g)<<" "<<mp[k]<<endl;
            return 0;
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n>>m;
    int arr[n];
    vector<int> v;
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    int val;
    map<int,int> mp;
    for(int i=0;i<m;i++)
    {
        cin>>val;
        mp[val]=(i+1);
    }
    int g=v[0];
    for(int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        cout<<"NO"<<endl;
        return 0;
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<arr[0]<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,m;
    cin>>n>>m;
    long long int arr[n];
    vector<long long int> v;
    for(long long int i=0;i<n;i++)
    {
        cin>>arr[i];
        if(i!=0)
        {
            v.push_back(arr[i]-arr[i-1]);
        }
    }
    sort(v.begin(),v.end());
    long long int val;
    map<long long int,long long int> mp;
    for(long long int i=0;i<m;i++)
    {
        cin>>val;
        if(mp.find(val)==mp.end())
        {
            mp[val]=(i+1);
        }
    }
    long long int g=v[0];
    for(long long int i=1;i<v.size();i++)
    {
        g=__gcd(g,v[i]);
    }
    if(mp.find(g)==mp.end())
    {
        long long int k=1;
        /*if(mp.find(k)==mp.end())
        {
        cout<<"NO"<<endl;
        return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[k]<<endl;
            return 0;
        }*/
        int flag=0;
        long long int ans=0;
        for(long long int i=1;i<=sqrt(g);i++)
        {
            if(g%i==0)
            {
                if(mp.find(i)!=mp.end())
                {
                    ans=i;
                    flag=1;
                    break;
                }
            }
        }
        if(flag==0)
        {
            cout<<"NO"<<endl;
            return 0;
        }
        else
        {
            cout<<"YES"<<endl;
            cout<<arr[0]<<" "<<mp[ans]<<endl;
            return 0;
        }
    }
    else
    {
        cout<<"YES"<<endl;
        cout<<min(arr[0],g)<<" "<<mp[g]<<endl;
        return 0;
    }
    return 0;
}


/*
 *  Author: Tara Prasad
 */
#include <bits/stdc++.h>
// #include "printcpp11.h"
using namespace std;

#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define REV_ALL(x) x.rbegin(), x.rend()
#define SZ(x) (int)x.size()
#define CONTAINS(cont, val) (cont.find(val) != cont.end())
#define endl '\n'
#define IO_SPEED_UP ios::sync_with_stdio(false);cin.tie(NULL)
#define FOR(i, s, e) for(ll i = s; i < e; i++)
#define leftmost_set(x) __builtin_clzll(x)
#define CASET int ___T; cin >> ___T; while (___T--)
#define wi(x) what_is(x)
#define what_is(x) cerr << #x << " = " << x << endl;
#define PARENT(n) (n / 2)
#define LCHILD(n) (2 * n)
#define RCHILD(n) (2 * n + 1)

typedef long long ll;typedef pair<ll, ll> ii;
typedef vector<ll> vi;typedef vector<bool> vb;
typedef vector<ii> vii;typedef vector<vi> vvi;

const ll PINF = 1E9;
const ll NINF = -1E9;
const ll M = 1E9 + 7;
const double EPS = 1E-9;
const double PI = 2 * acos(0);

template <typename T> ostream& operator<<(ostream& os, const vector<T> &p){os << "[ "; for (T x: p) os << x << " "; os << "]" << endl; return os;}
template <typename T> ostream& operator<<(ostream& os, const set<T> &p){os << "{ "; for (T x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const map<Tk, Tv> &p){os << "{ "; for (pair<Tk, Tv> x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const pair<Tk, Tv> &p){os << "{" << p.first << ',' << p.second << "}";return os;}

void get_arr(vi& a, int n) {
	if(SZ(a) < n) a.resize(n); for(int i = 0; i < n; i++) cin >> a[i];
}

void print_arr(const vi &a) {
	for(int i = 0; i < SZ(a); i++) {cout << a[i] << " ";} cout << endl;
}

struct op {
	char sym;
	ll a, b;
	op(ll x, char s, ll y) : sym(s), a(x), b(y) {}
};

void print(vector<op>& ops) {
	for (int i = 0; i < SZ(ops); ++i) {
		cout << ops[i].a << " " << ops[i].sym << " " << ops[i].b << endl;
	}
}

int main() {
	IO_SPEED_UP;
	if(fopen("tupni.txt", "r")) {
		freopen("tupni.txt", "r", stdin);
		freopen("tuptuo.txt", "w", stdout);
	}
	int n; cin >> n;
	if(n <= 3) return 0 * puts("NO");
	vector<op> ops;
	if(n == 4) {
		ops.pb(op(4, '*', 3));
		ops.pb(op(12, '*', 2));
		ops.pb(op(24, '*', 1));
	} else if(n == 5) {
		ops.pb(op(5, '-', 1));
		ops.pb(op(4, '-', 2));
		ops.pb(op(4, '*', 3));
		ops.pb(op(12, '*', 2));
		ops.pb(op(24, '*', 1));
	} else {
		int last;
		for (int i = n; i >= 6; i -= 2) {
			if(i != n) ops.pb(op(1, '*', i));
			ops.pb(op(i, '-', i - 1));
			last = i - 1;
		}
		ops.pb(op(1, '*', 1));
		if(last == 5) {
			ops.pb(op(4, '*', 3));
			ops.pb(op(12, '*', 2));
			ops.pb(op(24, '*', 1));
		} else {
			ops.pb(op(5, '-', 1));
			ops.pb(op(4, '-', 2));
			ops.pb(op(4, '*', 3));
			ops.pb(op(12, '*', 2));
			ops.pb(op(24, '*', 1));
		}
	}
	print(ops);
	return 0;
}


/*
 *  Author: Tara Prasad
 */
#include <bits/stdc++.h>
// #include "printcpp11.h"
using namespace std;

#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define REV_ALL(x) x.rbegin(), x.rend()
#define SZ(x) (int)x.size()
#define CONTAINS(cont, val) (cont.find(val) != cont.end())
#define endl '\n'
#define IO_SPEED_UP ios::sync_with_stdio(false);cin.tie(NULL)
#define FOR(i, s, e) for(ll i = s; i < e; i++)
#define leftmost_set(x) __builtin_clzll(x)
#define CASET int ___T; cin >> ___T; while (___T--)
#define wi(x) what_is(x)
#define what_is(x) cerr << #x << " = " << x << endl;
#define PARENT(n) (n / 2)
#define LCHILD(n) (2 * n)
#define RCHILD(n) (2 * n + 1)

typedef long long ll;typedef pair<ll, ll> ii;
typedef vector<ll> vi;typedef vector<bool> vb;
typedef vector<ii> vii;typedef vector<vi> vvi;

const ll PINF = 1E9;
const ll NINF = -1E9;
const ll M = 1E9 + 7;
const double EPS = 1E-9;
const double PI = 2 * acos(0);

template <typename T> ostream& operator<<(ostream& os, const vector<T> &p){os << "[ "; for (T x: p) os << x << " "; os << "]" << endl; return os;}
template <typename T> ostream& operator<<(ostream& os, const set<T> &p){os << "{ "; for (T x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const map<Tk, Tv> &p){os << "{ "; for (pair<Tk, Tv> x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const pair<Tk, Tv> &p){os << "{" << p.first << ',' << p.second << "}";return os;}

void get_arr(vi& a, int n) {
	if(SZ(a) < n) a.resize(n); for(int i = 0; i < n; i++) cin >> a[i];
}

void print_arr(const vi &a) {
	for(int i = 0; i < SZ(a); i++) {cout << a[i] << " ";} cout << endl;
}

struct op {
	char sym;
	ll a, b;
	op(ll x, char s, ll y) : sym(s), a(x), b(y) {}
	ll get_res() {
		if(sym == '*') return a*b;
		if(sym == '+') return a+b;
		if(sym == '-') return a-b;
		return 0;
	}
};

void print(vector<op>& ops) {
	for (int i = 0; i < SZ(ops); ++i) {
		cout << ops[i].a << " " << ops[i].sym << " " << ops[i].b
				<< " = " << ops[i].get_res() << endl;
	}
}

int main() {
	IO_SPEED_UP;
	if(fopen("tupni.txt", "r")) {
		freopen("tupni.txt", "r", stdin);
		freopen("tuptuo.txt", "w", stdout);
	}
	int n; cin >> n;
	if(n <= 3) return 0 * puts("NO");
	vector<op> ops;
	if(n == 4) {
		ops.pb(op(4, '*', 3));
		ops.pb(op(12, '*', 2));
		ops.pb(op(24, '*', 1));
	} else if(n == 5) {
		ops.pb(op(5, '-', 1));
		ops.pb(op(4, '-', 2));
		ops.pb(op(4, '*', 3));
		ops.pb(op(12, '*', 2));
	} else {
		int last;
		for (int i = n; i >= 6; i -= 2) {
			if(i != n) ops.pb(op(1, '*', i));
			ops.pb(op(i, '-', i - 1));
			last = i - 1;
		}
		ops.pb(op(1, '*', 1));
		if(last == 5) {
			ops.pb(op(4, '*', 3));
			ops.pb(op(12, '*', 2));
			ops.pb(op(24, '*', 1));
		} else {
			ops.pb(op(5, '-', 1));
			ops.pb(op(4, '-', 2));
			ops.pb(op(4, '*', 3));
			ops.pb(op(12, '*', 2));
		}
	}
	cout << "YES" << endl;
	print(ops);
	return 0;
}


/*
 *  Author: Tara Prasad
 */
#include <bits/stdc++.h>
// #include "printcpp11.h"
using namespace std;

#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define REV_ALL(x) x.rbegin(), x.rend()
#define SZ(x) (int)x.size()
#define CONTAINS(cont, val) (cont.find(val) != cont.end())
#define endl '\n'
#define IO_SPEED_UP ios::sync_with_stdio(false);cin.tie(NULL)
#define FOR(i, s, e) for(ll i = s; i < e; i++)
#define leftmost_set(x) __builtin_clzll(x)
#define CASET int ___T; cin >> ___T; while (___T--)
#define wi(x) what_is(x)
#define what_is(x) cerr << #x << " = " << x << endl;
#define PARENT(n) (n / 2)
#define LCHILD(n) (2 * n)
#define RCHILD(n) (2 * n + 1)

typedef long long ll;typedef pair<ll, ll> ii;
typedef vector<ll> vi;typedef vector<bool> vb;
typedef vector<ii> vii;typedef vector<vi> vvi;

const ll PINF = 1E9;
const ll NINF = -1E9;
const ll M = 1E9 + 7;
const double EPS = 1E-9;
const double PI = 2 * acos(0);

template <typename T> ostream& operator<<(ostream& os, const vector<T> &p){os << "[ "; for (T x: p) os << x << " "; os << "]" << endl; return os;}
template <typename T> ostream& operator<<(ostream& os, const set<T> &p){os << "{ "; for (T x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const map<Tk, Tv> &p){os << "{ "; for (pair<Tk, Tv> x: p) os << x << " "; os << "}" << endl; return os;}
template <typename Tk, typename Tv> ostream& operator<<(ostream& os, const pair<Tk, Tv> &p){os << "{" << p.first << ',' << p.second << "}";return os;}

void get_arr(vi& a, int n) {
	if(SZ(a) < n) a.resize(n); for(int i = 0; i < n; i++) cin >> a[i];
}

void print_arr(const vi &a) {
	for(int i = 0; i < SZ(a); i++) {cout << a[i] << " ";} cout << endl;
}

struct op {
	char sym;
	ll a, b;
	op(ll x, char s, ll y) : sym(s), a(x), b(y) {}
};

void print(vector<op>& ops) {
	for (int i = 0; i < SZ(ops); ++i) {
		cout << ops[i].a << " " << ops[i].sym << " " << ops[i].b << endl;
	}
}

int main() {
	IO_SPEED_UP;
	if(fopen("tupni.txt", "r")) {
		freopen("tupni.txt", "r", stdin);
		freopen("tuptuo.txt", "w", stdout);
	}
	int n; cin >> n;
	if(n <= 3) return 0 * puts("NO");
	vector<op> ops;
	if(n == 4) {
		ops.pb(op(4, '*', 3));
		ops.pb(op(12, '*', 2));
		ops.pb(op(24, '*', 1));
	} else if(n == 5) {
		ops.pb(op(5, '-', 1));
		ops.pb(op(4, '-', 2));
		ops.pb(op(4, '*', 3));
		ops.pb(op(12, '*', 2));
		ops.pb(op(24, '*', 1));
	} else {
		int last;
		for (int i = n; i >= 6; i -= 2) {
			if(i != n) ops.pb(op(1, '*', i));
			ops.pb(op(i, '-', i - 1));
			last = i - 1;
		}
		ops.pb(op(1, '*', 1));
		if(last == 5) {
			ops.pb(op(4, '*', 3));
			ops.pb(op(12, '*', 2));
			ops.pb(op(24, '*', 1));
		} else {
			ops.pb(op(5, '-', 1));
			ops.pb(op(4, '-', 2));
			ops.pb(op(4, '*', 3));
			ops.pb(op(12, '*', 2));
			ops.pb(op(24, '*', 1));
		}
	}
	cout << "YES" << endl;
	print(ops);
	return 0;
}


#define _CRT_SECURE_NO_WAR
#include<bits/stdc++.h>
using namespace std;
#define ull long long int
#define ll unsigned long long int
#define file freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define KingOfWrongAnswer cin.tie(0);std::ios::sync_with_stdio(false);
#define forit(i, a) for ( __typeof( (a).begin() ) i = (a).begin(); i != (a).end(); i++ )
#define mp make_pair
#define pb push_back
#define clr(a,n) memset(a,n,sizeof(a))
#define all(c) c.begin(), c.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define popone(a) __builtin_popcount(a)
#define popzero(a) __builtin_ctz(a)
#define PI = 2.0*acos(0.0)
#define mod 1000000007
#define pi 3.14159265359
//ll gcd (ll x,ll y){if(y==0)return x;return gcd(y,x%y);}
//ll lcm(ll a,ll b){return a/gcd(a,b) * b;}
//int getbit(int n,int i){return ((n>>i)&1)==1;}
//int setbit(int n,int i,int val){return val?(n|(1<<i)):(n&~(1<<i));}
//int graycode(int i){return i^(i>>1);}
//bool power2(int x){return (x && !(x & (x - 1)));}
//ll largest_power(ll n){n = n| (n>>1);n= n| (n>>2);n = n| (n>>4);n = n| (n>>8);return (n+1)>>1;}
//bool cmp(pair<int,int>x,pair<int,int>y){if (x.first==y.first) return x.second>y.second;return x.first<y.first;}
//bool vaild(int x,int y,int n){return (0 <= x && x < n && 0 <= y && y < n);}
//int dx[] = {-1, -1, 1, 1, -2, -2, 2, 2 };
//int dy[] = {2, -2, 2, -2, 1, -1, 1, -1 };
//int dx[] = {0, 0, -1, 1, -1, -1, 1, 1};
//int dy[] = {-1, 1, 0, 0, 1, -1, -1, 1};
//int dx[]= {-1, 1, 0, 0};
//int dy[]= {0, 0, 1, -1};
int main()
{
    KingOfWrongAnswer
    int n;
    cin>>n;
    if(n<4)
        cout<<"NO\n";
    else
    {
        cout<<"YES\n";
        if(n==4)
        {
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<3<<" + "<<3<<" = "<<6<<endl;
        cout<<6<<" * "<<6<<" = "<<24<<endl;
            return 0;
        }
        if(n==5)
        {
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<1<<" + "<<3<<" = "<<4<<endl;
        cout<<4<<" * "<<5<<" = "<<20<<endl;
        cout<<20<<" + "<<4<<" = "<<24<<endl;
            return 0;
        }
        cout<<n<<" - "<<1<<" = "<<n-1<<endl;
        cout<<n-1<<" - "<<n-1<<" = "<<0<<endl;
        for(int i=5;i<n-1;i++)
            cout<<0<<" * "<<i<<" = "<<0<<endl;
        cout<<0<<" + "<<4<<" = "<<4<<endl;
        cout<<4<<" * "<<3<<" = "<<12<<endl;
        cout<<12<<" * "<<2<<" = "<<24<<endl;
    }
    return 0;
}


#define _CRT_SECURE_NO_WAR
#include<bits/stdc++.h>
using namespace std;
#define ull long long int
#define ll unsigned long long int
#define file freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define KingOfWrongAnswer cin.tie(0);std::ios::sync_with_stdio(false);
#define forit(i, a) for ( __typeof( (a).begin() ) i = (a).begin(); i != (a).end(); i++ )
#define mp make_pair
#define pb push_back
#define clr(a,n) memset(a,n,sizeof(a))
#define all(c) c.begin(), c.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define popone(a) __builtin_popcount(a)
#define popzero(a) __builtin_ctz(a)
#define PI = 2.0*acos(0.0)
#define mod 1000000007
#define pi 3.14159265359
//ll gcd (ll x,ll y){if(y==0)return x;return gcd(y,x%y);}
//ll lcm(ll a,ll b){return a/gcd(a,b) * b;}
//int getbit(int n,int i){return ((n>>i)&1)==1;}
//int setbit(int n,int i,int val){return val?(n|(1<<i)):(n&~(1<<i));}
//int graycode(int i){return i^(i>>1);}
//bool power2(int x){return (x && !(x & (x - 1)));}
//ll largest_power(ll n){n = n| (n>>1);n= n| (n>>2);n = n| (n>>4);n = n| (n>>8);return (n+1)>>1;}
//bool cmp(pair<int,int>x,pair<int,int>y){if (x.first==y.first) return x.second>y.second;return x.first<y.first;}
//bool vaild(int x,int y,int n){return (0 <= x && x < n && 0 <= y && y < n);}
//int dx[] = {-1, -1, 1, 1, -2, -2, 2, 2 };
//int dy[] = {2, -2, 2, -2, 1, -1, 1, -1 };
//int dx[] = {0, 0, -1, 1, -1, -1, 1, 1};
//int dy[] = {-1, 1, 0, 0, 1, -1, -1, 1};
//int dx[]= {-1, 1, 0, 0};
//int dy[]= {0, 0, 1, -1};
int main()
{
    KingOfWrongAnswer
    int n;
    cin>>n;
    if(n<4)
        cout<<"NO\n";
    else
    {
        cout<<"YES\n";
        if(n==4)
        {
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<3<<" + "<<3<<" = "<<6<<endl;
        cout<<6<<" * "<<4<<" = "<<24<<endl;
            return 0;
        }
        if(n==5)
        {
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<1<<" + "<<3<<" = "<<4<<endl;
        cout<<4<<" * "<<5<<" = "<<20<<endl;
        cout<<20<<" + "<<4<<" = "<<24<<endl;
            return 0;
        }
        cout<<n<<" - "<<1<<" = "<<n-1<<endl;
        cout<<n-1<<" - "<<n-1<<" = "<<0<<endl;
        for(int i=5;i<n-1;i++)
            cout<<0<<" * "<<i<<" = "<<0<<endl;
        cout<<0<<" + "<<4<<" = "<<4<<endl;
        cout<<4<<" * "<<3<<" = "<<12<<endl;
        cout<<12<<" * "<<2<<" = "<<24<<endl;
    }
    return 0;
}


#define _CRT_SECURE_NO_WAR
#include<bits/stdc++.h>
using namespace std;
#define ull long long int
#define ll unsigned long long int
#define file freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define KingOfWrongAnswer cin.tie(0);std::ios::sync_with_stdio(false);
#define forit(i, a) for ( __typeof( (a).begin() ) i = (a).begin(); i != (a).end(); i++ )
#define mp make_pair
#define pb push_back
#define clr(a,n) memset(a,n,sizeof(a))
#define all(c) c.begin(), c.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define popone(a) __builtin_popcount(a)
#define popzero(a) __builtin_ctz(a)
#define PI = 2.0*acos(0.0)
#define mod 1000000007
#define pi 3.14159265359
//ll gcd (ll x,ll y){if(y==0)return x;return gcd(y,x%y);}
//ll lcm(ll a,ll b){return a/gcd(a,b) * b;}
//int getbit(int n,int i){return ((n>>i)&1)==1;}
//int setbit(int n,int i,int val){return val?(n|(1<<i)):(n&~(1<<i));}
//int graycode(int i){return i^(i>>1);}
//bool power2(int x){return (x && !(x & (x - 1)));}
//ll largest_power(ll n){n = n| (n>>1);n= n| (n>>2);n = n| (n>>4);n = n| (n>>8);return (n+1)>>1;}
//bool cmp(pair<int,int>x,pair<int,int>y){if (x.first==y.first) return x.second>y.second;return x.first<y.first;}
//bool vaild(int x,int y,int n){return (0 <= x && x < n && 0 <= y && y < n);}
//int dx[] = {-1, -1, 1, 1, -2, -2, 2, 2 };
//int dy[] = {2, -2, 2, -2, 1, -1, 1, -1 };
//int dx[] = {0, 0, -1, 1, -1, -1, 1, 1};
//int dy[] = {-1, 1, 0, 0, 1, -1, -1, 1};
//int dx[]= {-1, 1, 0, 0};
//int dy[]= {0, 0, 1, -1};
int main()
{
    KingOfWrongAnswer
    int n;
    cin>>n;
    if(n<4)
        cout<<"NO\n";
    else
    {
        cout<"YES\n";
        if(n==4)
        {
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<3<<" + "<<3<<" = "<<6<<endl;
        cout<<6<<" * "<<6<<" = "<<24<<endl;
            return 0;
        }
        if(n==5)
        {
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<1<<" + "<<3<<" = "<<4<<endl;
        cout<<4<<" * "<<5<<" = "<<20<<endl;
        cout<<20<<" + "<<4<<" = "<<24<<endl;
            return 0;
        }
        cout<<n<<" - "<<1<<" = "<<n-1<<endl;
        cout<<n-1<<" - "<<n-1<<" = "<<0<<endl;
        for(int i=5;i<n-1;i++)
            cout<<0<<" * "<<i<<" = "<<0<<endl;
        cout<<0<<" + "<<4<<" = "<<4<<endl;
        cout<<4<<" * "<<3<<" = "<<12<<endl;
        cout<<12<<" * "<<2<<" = "<<24<<endl;
    }
    return 0;
}


#define _CRT_SECURE_NO_WAR
#include<bits/stdc++.h>
using namespace std;
#define ull long long int
#define ll unsigned long long int
#define file freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define KingOfWrongAnswer cin.tie(0);std::ios::sync_with_stdio(false);
#define forit(i, a) for ( __typeof( (a).begin() ) i = (a).begin(); i != (a).end(); i++ )
#define mp make_pair
#define pb push_back
#define clr(a,n) memset(a,n,sizeof(a))
#define all(c) c.begin(), c.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define popone(a) __builtin_popcount(a)
#define popzero(a) __builtin_ctz(a)
#define PI = 2.0*acos(0.0)
#define mod 1000000007
#define pi 3.14159265359
//ll gcd (ll x,ll y){if(y==0)return x;return gcd(y,x%y);}
//ll lcm(ll a,ll b){return a/gcd(a,b) * b;}
//int getbit(int n,int i){return ((n>>i)&1)==1;}
//int setbit(int n,int i,int val){return val?(n|(1<<i)):(n&~(1<<i));}
//int graycode(int i){return i^(i>>1);}
//bool power2(int x){return (x && !(x & (x - 1)));}
//ll largest_power(ll n){n = n| (n>>1);n= n| (n>>2);n = n| (n>>4);n = n| (n>>8);return (n+1)>>1;}
//bool cmp(pair<int,int>x,pair<int,int>y){if (x.first==y.first) return x.second>y.second;return x.first<y.first;}
//bool vaild(int x,int y,int n){return (0 <= x && x < n && 0 <= y && y < n);}
//int dx[] = {-1, -1, 1, 1, -2, -2, 2, 2 };
//int dy[] = {2, -2, 2, -2, 1, -1, 1, -1 };
//int dx[] = {0, 0, -1, 1, -1, -1, 1, 1};
//int dy[] = {-1, 1, 0, 0, 1, -1, -1, 1};
//int dx[]= {-1, 1, 0, 0};
//int dy[]= {0, 0, 1, -1};
int main()
{
    KingOfWrongAnswer
    int n;
    cin>>n;
    if(n<4)
        cout<<"NO\n";
    else
    {
        cout<<"YES\n";
        if(n==4)
        {
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<3<<" + "<<3<<" = "<<6<<endl;
        cout<<6<<" * "<<4<<" = "<<24<<endl;
            return 0;
        }
        if(n==5)
        {
        cout<<5<<" - "<<3<<" = "<<2<<endl;
        cout<<4<<" * "<<2<<" = "<<8<<endl;
        cout<<1<<" + "<<2<<" = "<<3<<endl;
        cout<<8<<" * "<<3<<" = "<<24<<endl;
            return 0;
        }
        cout<<n<<" - "<<1<<" = "<<n-1<<endl;
        cout<<n-1<<" - "<<n-1<<" = "<<0<<endl;
        for(int i=5;i<n-1;i++)
            cout<<0<<" * "<<i<<" = "<<0<<endl;
        cout<<0<<" + "<<4<<" = "<<4<<endl;
        cout<<4<<" * "<<3<<" = "<<12<<endl;
        cout<<12<<" * "<<2<<" = "<<24<<endl;
    }
    return 0;
}


/*
 *Author - Bhanu Pratap
 */
#include <bits/stdc++.h>
#define endl '\n'
#define F first
#define S second
#define all(c) c.begin(), c.end()
#define rep(i,a,b) for (int i=a; i<b; i++)

using namespace std;

typedef long long int ll;
typedef long double ld;

const ll mod = 1e9 + 7;
const ld PI = 3.141592653589793;
const ll INF = 9223372036854775807ll;

void solve () {
	int n;
	cin>>n;
	if (n<4) {
		cout<<"NO";
		return ;
	}
	cout<<"YES\n";
	if (n==4) {
		int t=1;
		rep(i,2,5) {
			cout<<t<<" * "<<i<<" = "<<t*i<<endl;
			t*=i;
		}
		return ;
	}
	vector <int> v(n);
	iota(all(v),1);
	ll t=n*(n-1);
	cout<<n<<" * "<<n-1<<" = "<<t<<endl;
	rep(i,0,2) v.pop_back();
	if (n>6) {
		ll r=(n-2)*(n-3);
	    cout<<n-2<<" * "<<n-3<<" = "<<r<<endl;
	    cout<<t<<" - "<<r<<" = "<<t-r<<endl;
	    t-=r;
	    rep(i,0,2) v.pop_back();
	}
	while (v.size() && t!=24) {
		cout<<t<<((t>24) ? " - " : " + ")<<v.back()<<" = "<<((t>24) ? t-v.back() : t+v.back())<<endl;
		t=((t>24) ? t-v.back() : t+v.back());
		v.pop_back();
	}
	if (v.size()) {
	t=v.back();
	v.pop_back();
	while (v.size()) {
		cout<<t<<((t<=0) ? " + " : " - ")<<v.back()<<" = "<<((t<=0) ? t+v.back() : t-v.back())<<endl;
		t=((t<=0) ? t+v.back() : t-v.back());
		v.pop_back();
	}
	cout<<24<<((t==0) ? " + " : " * ")<<t<<" = "<<24<<endl;
	}
}
main(){
    ios_base::sync_with_stdio(false); cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    int t=1;
    //cin>>t;
    while (t--) solve();
    return 0;
}


/*
 *Author - Bhanu Pratap
 */
#include <bits/stdc++.h>
#define endl '\n'
#define F first
#define S second
#define all(c) c.begin(), c.end()
#define rep(i,a,b) for (int i=a; i<b; i++)

using namespace std;

typedef long long int ll;
typedef long double ld;

const ll mod = 1e9 + 7;
const ld PI = 3.141592653589793;
const ll INF = 9223372036854775807ll;

void solve () {
	int n;
	cin>>n;
	if (n<4) {
		cout<<"NO";
		return ;
	}
	cout<<"YES\n";
	if (n==4) {
		int t=1;
		rep(i,2,5) {
			cout<<t<<"*"<<i<<"="<<t*i<<endl;
			t*=i;
		}
		return ;
	}
	vector <int> v(n);
	iota(all(v),1);
	ll t=n*(n-1);
	cout<<n<<"*"<<n-1<<"="<<t<<endl;
	rep(i,0,2) v.pop_back();
	if (n>6) {
		ll r=(n-2)*(n-3);
	    cout<<n-2<<"*"<<n-3<<"="<<r<<endl;
	    cout<<t<<"-"<<r<<"="<<t-r<<endl;
	    t-=r;
	    rep(i,0,2) v.pop_back();
	}
	while (v.size() && t!=24) {
		cout<<t<<((t>24) ? '-' : '+')<<v.back()<<'='<<((t>24) ? t-v.back() : t+v.back())<<endl;
		t=((t>24) ? t-v.back() : t+v.back());
		v.pop_back();
	}
	if (v.size()) {
	t=v.back();
	v.pop_back();
	while (v.size()) {
		cout<<t<<((t<=0) ? '+' : '-')<<v.back()<<'='<<((t<=0) ? t+v.back() : t-v.back())<<endl;
		t=((t<=0) ? t+v.back() : t-v.back());
		v.pop_back();
	}
	cout<<24<<((t==0) ? '+' : '*')<<t<<'='<<24<<endl;
	}
}
main(){
    ios_base::sync_with_stdio(false); cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    int t=1;
    //cin>>t;
    while (t--) solve();
    return 0;
}


/*
 *Author - Bhanu Pratap
 */
#include <bits/stdc++.h>
#define endl '\n'
#define F first
#define S second
#define all(c) c.begin(), c.end()
#define rep(i,a,b) for (int i=a; i<b; i++)

using namespace std;

typedef long long int ll;
typedef long double ld;

const ll mod = 1e9 + 7;
const ld PI = 3.141592653589793;
const ll INF = 9223372036854775807ll;

void solve () {
	ll n;
	cin>>n;
	if (n<4) {
		cout<<"NO";
		return ;
	}
	cout<<"YES\n";
	if (n==4) {
		int t=1;
		rep(i,2,5) {
			cout<<t<<" * "<<i<<" = "<<t*i<<endl;
			t*=i;
		}
		return ;
	}
	vector <ll> v(n);
	iota(all(v),1);
	ll t=n*(n-1);
	cout<<n<<" * "<<n-1<<" = "<<t<<endl;
	rep(i,0,2) v.pop_back();
	if (n>6) {
		ll r=(n-2)*(n-3);
	    cout<<n-2<<" * "<<n-3<<" = "<<r<<endl;
	    cout<<t<<" - "<<r<<" = "<<t-r<<endl;
	    t-=r;
	    rep(i,0,2) v.pop_back();
	}
	while (v.size() && t!=24) {
		cout<<t<<((t>24) ? " - " : " + ")<<v.back()<<" = "<<((t>24) ? t-v.back() : t+v.back())<<endl;
		t=((t>24) ? t-v.back() : t+v.back());
		v.pop_back();
	}
	if (v.size()) {
	t=v.back();
	v.pop_back();
	while (v.size()) {
		cout<<t<<((t<=0) ? " + " : " - ")<<v.back()<<" = "<<((t<=0) ? t+v.back() : t-v.back())<<endl;
		t=((t<=0) ? t+v.back() : t-v.back());
		v.pop_back();
	}
	cout<<24<<((t==0) ? " + " : " * ")<<t<<" = "<<24<<endl;
	}
}
main(){
    ios_base::sync_with_stdio(false); cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    int t=1;
    //cin>>t;
    while (t--) solve();
    return 0;
}


/*
 *Author - Bhanu Pratap
 */
#include <bits/stdc++.h>
#define endl '\n'
#define F first
#define S second
#define all(c) c.begin(), c.end()
#define rep(i,a,b) for (int i=a; i<b; i++)

using namespace std;

typedef long long int ll;
typedef long double ld;

const ll mod = 1e9 + 7;
const ld PI = 3.141592653589793;
const ll INF = 9223372036854775807ll;

void solve () {
	int n;
	cin>>n;
	if (n<4) {
		cout<<"NO";
		return ;
	}
	cout<<"YES\n";
	if (n==4) {
		int t=1;
		rep(i,2,5) {
			cout<<t<<"*"<<i<<"="<<t*i<<endl;
			t*=i;
		}
		return ;
	}
	vector <int> v(n);
	iota(all(v),1);
	ll t=n*(n-1);
	cout<<n<<"*"<<n-1<<"="<<t<<endl;
	rep(i,0,2) v.pop_back();
	if (n>6) {
		ll r=(n-2)*(n-3);
	    cout<<n-2<<"*"<<n-3<<"="<<r<<endl;
	    cout<<t<<"-"<<r<<"="<<t-r<<endl;
	    t-=r;
	    rep(i,0,2) v.pop_back();
	}
	while (v.size() && t!=24) {
		cout<<t<<((t>24) ? '-' : '+')<<v.back()<<'='<<((t>24) ? t-v.back() : t+v.back())<<endl;
		t=((t>24) ? t-v.back() : t+v.back());
		v.pop_back();
	}
	t=v.back();
	v.pop_back();
	while (v.size()) {
		cout<<t<<((t<=0) ? '+' : '-')<<v.back()<<'='<<((t<=0) ? t+v.back() : t-v.back())<<endl;
		t=((t<=0) ? t+v.back() : t-v.back());
		v.pop_back();
	}
	cout<<24<<((t==0) ? '+' : '*')<<t<<'='<<24<<endl;
}
main(){
    ios_base::sync_with_stdio(false); cin.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    int t=1;
    //cin>>t;
    while (t--) solve();
    return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define int long long

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
// find_by_order(k-1)  returns iterator to kth element starting from 0; Returns the kth smallest element
// order_of_key(k) returns count of elements strictly smaller than k;Returns the number of elements less than k
// erase,insert same as normal set, CAREFUL it does not behave as multiset for it use pii

void solve() {
	int n;
	cin>>n;
	if(n<=3 || n&1){
		cout<<"NO\n";return;
	}

	cout<<"YES\n";
	cout<<"2 * 3 = 6"<<endl;
	cout<<"6 * 4 = 24"<<endl;
	set<int> S;
	for(int i=5;i<=n;i++){
		S.insert(i);
		if(S.size()==2){
			cout<<(*(--(S.end())))<<" - "<<(*(S.begin()))<<" = 1"<<endl;
			S.clear();
		}
	}

	int cnt=(n-4)/2;
	while(cnt>1){
		cout<<"1 * 1 = 1"<<endl;
		cnt--;
	}
	if(n>=5)
		cout<<"1 * 1 = 1"<<endl;
	cout<<"1 * 24 = 24"<<endl;

}

int32_t main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	if(fopen("input.txt", "r")){
	    freopen("input.txt", "r", stdin),
	    freopen("output.txt", "w", stdout);
	}

	int t = 1;
	//cin>>t;
	while (t--) {
		solve();
	}
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define int long long

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
// find_by_order(k-1)  returns iterator to kth element starting from 0; Returns the kth smallest element
// order_of_key(k) returns count of elements strictly smaller than k;Returns the number of elements less than k
// erase,insert same as normal set, CAREFUL it does not behave as multiset for it use pii

void solve() {
	int n;
	cin>>n;
	if(n<=3){
		cout<<"NO\n";return;
	}

	cout<<"YES\n";
	if(n&1){
		cout<<n<<" - "<<n-4<<" = 4"<<endl;
		cout<<n-1<<" - "<<n-3<<" = 2"<<endl;
		if(n>5)
			cout<<n-2<<" - "<<n-5<<" = 3"<<endl;
		cout<<"2 * 3 = 6"<<endl;
		cout<<"6 * 4 = 24"<<endl;
		for(int i=2;i<n-5;i+=2){
			cout<<i+1<<" - "<<i<<" = 1"<<endl;
		}

		int cnt=(n-5-2)/2;
		while(cnt>1){
			cout<<"1 * 1 = 1"<<endl;
			cnt--;
		}
		if(n>7){
			cout<<"1 * 1 = 1"<<endl;
		}
		if(n>5)	cout<<"1 * 24 = 24"<<endl;
		return;
	}

	cout<<"2 * 3 = 6"<<endl;
	cout<<"6 * 4 = 24"<<endl;
	set<int> S;
	for(int i=5;i<=n;i++){
		S.insert(i);
		if(S.size()==2){
			cout<<(*(--(S.end())))<<" - "<<(*(S.begin()))<<" = 1"<<endl;
			S.clear();
		}
	}

	int cnt=(n-4)/2;
	while(cnt>1){
		cout<<"1 * 1 = 1"<<endl;
		cnt--;
	}
	if(n>=5)
		cout<<"1 * 1 = 1"<<endl;
	cout<<"1 * 24 = 24"<<endl;

}

int32_t main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	if(fopen("input.txt", "r")){
	    freopen("input.txt", "r", stdin),
	    freopen("output.txt", "w", stdout);
	}

	int t = 1;
	//cin>>t;
	while (t--) {
		solve();
	}
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define int long long

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
// find_by_order(k-1)  returns iterator to kth element starting from 0; Returns the kth smallest element
// order_of_key(k) returns count of elements strictly smaller than k;Returns the number of elements less than k
// erase,insert same as normal set, CAREFUL it does not behave as multiset for it use pii

void solve() {
	int n;
	cin>>n;
	if(n<=3 || n&1){
		cout<<"NO\n";return;
	}

	cout<<"2 * 3 = 6"<<endl;
	cout<<"6 * 4 = 24"<<endl;
	set<int> S;
	for(int i=5;i<=n;i++){
		S.insert(i);
		if(S.size()==2){
			cout<<(*(--(S.end())))<<" - "<<(*(S.begin()))<<" = 1"<<endl;
			S.clear();
		}
	}

	int cnt=(n-4)/2;
	while(cnt>1){
		cout<<"1 * 1 = 1"<<endl;
		cnt--;
	}
	if(n>=5)
		cout<<"1 * 1 = 1"<<endl;
	cout<<"1 * 24 = 24"<<endl;

}

int32_t main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	if(fopen("input.txt", "r")){
	    freopen("input.txt", "r", stdin),
	    freopen("output.txt", "w", stdout);
	}

	int t = 1;
	//cin>>t;
	while (t--) {
		solve();
	}
}


#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n'
#define m3lsh return 0;
typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }

int  dix[] = { 1, -1, 0, 0, 1, 1, -1, -1 };
int  diy[] = { 0, 0, 1, -1, 1, -1, 1, -1 };
int main() {
	fast;
	ll n; cin >> n;
	if (n < 4 )cout << "NO" << endl;
	else if (n == 4) {
		cout << "YES" << endl;
		int mul = 1;
		for (int i = 2; i <=4; i++) {
			cout << mul << " * " << i << " = " << mul*i << endl;
			mul *= i;
		}
	}
	else {
		int mul = 1; cout << "YES" << endl;
		if (n % 2 == 0) {
			for (int i = 2; i <= 4; i++) {
				cout << mul << " * " << i << " = " << mul*i << endl;
				mul *= i;
			}
			for (int i = 5; i < n; i += 2) {
				cout << i + 1 << " - " << i << " = " << 1 << endl;
				cout << mul << " * " << 1 << " = " << mul << endl;
			}
		}
		else {
			cout << "5 - 3 = 2"<<endl;
			cout << "2 * 4 = 8" << endl;
			cout << "1 + 2 = 3" << endl;
			cout << "8 * 3 = 24" << endl;
			mul = 24;
			for (int i = 6; i < n; i += 2) {
				cout << i + 1 << " - " << i << " = " << 1 << endl;
				cout << mul << " * " << 1 << " = " << mul << endl;
			}
		}
	}
	m3lsh;
}


#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n'
#define m3lsh return 0;
typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }

int  dix[] = { 1, -1, 0, 0, 1, 1, -1, -1 };
int  diy[] = { 0, 0, 1, -1, 1, -1, 1, -1 };
int main() {
	fast;
	ll n; cin >> n;
	if (n < 4 || n % 2)cout << "NO" << endl;
	else if (n == 4) {
		cout << "YES" << endl;
		int mul = 1;
		for (int i = 2; i <=4; i++) {
			cout << mul << " * " << i << " = " << mul*i << endl;
			mul *= i;
		}
	}
	else {
		ll mul = 0; bool min = 0;
		vector<string>vs;
		for (int i = n; i > 4; i -= 2) {
			if (min)mul -= (i*(i - 1)),min=0;
			else mul += (i*(i - 1)),min=1;
		}
		for (int i = 4; i >= 1; i--) {
			if (mul > 24)mul-= i;
			else mul += i;
		}
		if (mul == 24) {
			cout << "YES" << endl;
			mul = 0, min = 0; vector<ll>v;
			for (int i = n; i > 4; i -= 2) {
				cout << i << " * " << i - 1 << " = " << (i*(i - 1)) << endl;
				v.push_back(i*(i - 1));
			}
			mul = v[0]; min = 1;
			for (int i =1; i <v.size(); i++) {
				if (min) {
					cout << mul << " - " << v[i] << " = " << mul - v[i] << endl; mul -= v[i], min = 0;
				}
				else {
					cout << mul << " + " << v[i] << " = " << mul + v[i] << endl; mul += v[i], min = 1;
				}
			}

			for (int i = 4; i >= 1; i--) {
				if (mul > 24) { cout << mul << " - " << i << " = " << mul - i << endl;; mul -= i; }
				else {
					cout << mul << " + " << i << " = " << mul + i << endl;; mul += i;
				}
			}
		}
		else cout << "NO" << endl;
	}
	m3lsh;
}


#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n'
#define m3lsh return 0;
typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }

int  dix[] = { 1, -1, 0, 0, 1, 1, -1, -1 };
int  diy[] = { 0, 0, 1, -1, 1, -1, 1, -1 };
int main() {
	fast;
	ll n; cin >> n;
	if (n < 4 || n % 2)cout << "NO" << endl;
	else if (n == 4) {
		cout << "YES" << endl;
		int mul = 1;
		for (int i = 2; i <=4; i++) {
			cout << mul << " * " << i << " = " << mul*i << endl;
			mul *= i;
		}
	}
	else {
		int mul = 1;
		for (int i = 2; i <= 4; i++) {
			cout << mul << " * " << i << " = " << mul*i << endl;
			mul *= i;
		}
		for (int i = 5; i < n; i+=2) {
			cout << i+1 << " - " << i << " = " << 1 << endl;
			cout << mul << " * " << 1 << " = " << mul << endl;
		}
	}
	m3lsh;
}


#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n'
#define m3lsh return 0;
typedef long long ll;
typedef unsigned long long ull;

ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; }

int  dix[] = { 1, -1, 0, 0, 1, 1, -1, -1 };
int  diy[] = { 0, 0, 1, -1, 1, -1, 1, -1 };
int main() {
	fast;
	ll n; cin >> n;
	if (n < 4 || n % 2)cout << "NO" << endl;
	else if (n == 4) {
		cout << "YES" << endl;
		int mul = 1;
		for (int i = 2; i <=4; i++) {
			cout << mul << " * " << i << " = " << mul*i << endl;
			mul *= i;
		}
	}
	else {
		int mul = 1; cout << "YES" << endl;
		for (int i = 2; i <= 4; i++) {
			cout << mul << " * " << i << " = " << mul*i << endl;
			mul *= i;
		}
		for (int i = 5; i < n; i+=2) {
			cout << i+1 << " - " << i << " = " << 1 << endl;
			cout << mul << " * " << 1 << " = " << mul << endl;
		}
	}
	m3lsh;
}


#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
using namespace std;
typedef long long ll;

int main() {
	int n;
	scanf("%d", &n);
	if (n <= 3) puts("NO");
	else if (n == 4) {
		puts("YES");
		puts("1 * 2 = 2");
		puts("2 * 3 = 6");
		puts("6 * 4 = 24");
	}
	else if (n == 5) {
		puts("YES");
		puts("1 + 2 = 3");
		puts("5 - 3 = 2");
		puts("2 * 4 = 8");
		puts("8 * 3 = 24");
	}
	else {
		if (n % 2 == 0) {
			puts("YES");
			puts("1 * 2 = 2");
			puts("2 * 3 = 6");
			puts("6 * 4 = 24");
			for (int i = 5; i <= n; i += 2) {
				printf("%d - %d = 1\n", i + 1, i);
				printf("24 * 1 = 24\n");
			}
		}
		else {
			puts("YES");
			puts("1 + 2 = 3");
			puts("5 - 3 = 2");
			puts("2 * 4 = 8");
			puts("8 * 3 = 24");
			for (int i = 6; i <= n; i += 2) {
				printf("%d - %d = 1\n", i + 1, i);
				printf("24 * 1 = 24\n");
			}
		}
	}
}


#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
using namespace std;

typedef long long ll;

bool dfs(vector <ll> v, int K) {
	if (v.size() == 1) {
		if (v[0] == 24)
			return 1;
		return 0;
	}
	for (int i = 0; i < v.size(); i++) {
		for (int j = 0; j < v.size(); j++) {
			if (i == j) continue;
			vector <ll> g;
			for (int k = 0; k < v.size(); k++) {
				if (i == k || j == k) continue;
				g.push_back(v[k]);
			}
			if (v[i] + v[j] <= 1e18) {
				g.push_back(v[i] + v[j]);
				if (dfs(g, K)) {
					printf("%lld + %lld = %lld\n", v[i], v[j], v[i] + v[j]);
					return 1;
				}
				g.pop_back();
			}
			if (v[i] - v[j] <= 1e18) {
				g.push_back(v[i] - v[j]);
				if (dfs(g, K)) {
					printf("%lld - %lld = %lld\n", v[i], v[j], v[i] - v[j]);
					return 1;
				}
				g.pop_back();
			}
			if (fabs(log10((double)(v[i])) + log10((double)(v[j]))) < 18.0) {
				g.push_back(v[i] * v[j]);
				if (dfs(g, K)) {
					printf("%lld * %lld = %lld\n", v[i], v[j], v[i] * v[j]);
					return 1;
				}
				g.pop_back();
			}
		}
	}
	return 0;
}

int main() {
	int n;
	scanf("%d", &n);
	if (n <= 3) puts("NO");
	else if (n == 4) {
		puts("YES");
		puts("1 * 2 = 2");
		puts("2 * 3 = 6");
		puts("6 * 4 = 24");
	}
	else if (n == 5) {
		puts("YES");
		puts("1 + 2 = 3");
		puts("5 - 3 = 2");
		puts("2 * 4 = 8");
		puts("8 * 3 = 24");
	}
	else {
		if (n % 2 == 0) {
			puts("YES");
			puts("1 * 2 = 2");
			puts("2 * 3 = 6");
			puts("6 * 4 = 24");
			for (int i = 5; i <= n; i += 2) {
				printf("%d - %d = 1\n", i + 1, i);
				printf("24 * 1 = 24\n");
			}
		}
		else {
			puts("YES");
			puts("1 + 2 = 3");
			puts("5 - 3 = 2");
			puts("2 * 4 = 8");
			puts("8 * 3 = 24");
			for (int i = 6; i <= n; i += 2) {
				printf("%d - %d = 1\n", i + 1, i);
				printf("24 * 1 = 24\n");
			}
		}
	}
}


#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
using namespace std;

typedef long long ll;

bool dfs(vector <ll> v, int K) {
	if (v.size() == 1) {
		if (v[0] == 24)
			return 1;
		return 0;
	}
	for (int i = 0; i < v.size(); i++) {
		for (int j = 0; j < v.size(); j++) {
			if (i == j) continue;
			vector <ll> g;
			for (int k = 0; k < v.size(); k++) {
				if (i == k || j == k) continue;
				g.push_back(v[k]);
			}
			if (v[i] + v[j] <= 1e18) {
				g.push_back(v[i] + v[j]);
				if (dfs(g, K)) {
					printf("%lld + %lld = %lld\n", v[i], v[j], v[i] + v[j]);
					return 1;
				}
				g.pop_back();
			}
			if (v[i] - v[j] <= 1e18) {
				g.push_back(v[i] - v[j]);
				if (dfs(g, K)) {
					printf("%lld - %lld = %lld\n", v[i], v[j], v[i] - v[j]);
					return 1;
				}
				g.pop_back();
			}
			if (fabs(log10((double)(v[i])) + log10((double)(v[j]))) < 18.0) {
				g.push_back(v[i] * v[j]);
				if (dfs(g, K)) {
					printf("%lld * %lld = %lld\n", v[i], v[j], v[i] * v[j]);
					return 1;
				}
				g.pop_back();
			}
		}
	}
	return 0;
}

int main() {
	int n;
	scanf("%d", &n);
	if (n <= 3) puts("NO");
	else if (n == 4) {
		puts("YES");
		puts("1 * 2 = 2");
		puts("2 * 3 = 6");
		puts("6 * 4 = 24");
	}
	else if (n == 5) {
		puts("YES");
		puts("1 + 2 = 3");
		puts("5 - 3 = 2");
		puts("2 * 4 = 8");
		puts("8 * 3 = 24");
	}
	else {
		puts("YES");
		puts("1 * 2 = 2");
		puts("2 * 3 = 6");
		puts("6 * 4 = 24");
		for (int i = 5; i <= n; i += 2) {
			printf("%d - %d = 1\n", i + 1, i);
			printf("24 * 1 = 24\n");
		}
	}
}


#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
using namespace std;

typedef long long ll;

bool dfs(vector <ll> v, int K) {
	if (v.size() == 1) {
		if (v[0] == 24)
			return 1;
		return 0;
	}
	for (int i = 0; i < v.size(); i++) {
		for (int j = 0; j < v.size(); j++) {
			if (i == j) continue;
			vector <ll> g;
			for (int k = 0; k < v.size(); k++) {
				if (i == k || j == k) continue;
				g.push_back(v[k]);
			}
			if (v[i] + v[j] <= 1e18) {
				g.push_back(v[i] + v[j]);
				if (dfs(g, K)) {
					printf("%lld + %lld = %lld\n", v[i], v[j], v[i] + v[j]);
					return 1;
				}
				g.pop_back();
			}
			if (v[i] - v[j] <= 1e18) {
				g.push_back(v[i] - v[j]);
				if (dfs(g, K)) {
					printf("%lld - %lld = %lld\n", v[i], v[j], v[i] - v[j]);
					return 1;
				}
				g.pop_back();
			}
			if (fabs(log10((double)(v[i])) + log10((double)(v[j]))) < 18.0) {
				g.push_back(v[i] * v[j]);
				if (dfs(g, K)) {
					printf("%lld * %lld = %lld\n", v[i], v[j], v[i] * v[j]);
					return 1;
				}
				g.pop_back();
			}
		}
	}
	return 0;
}

int main() {
	int n;
	scanf("%d", &n);
	if (n <= 3) puts("NO");
	else if (n == 4) {
		puts("YES");
		puts("1 * 2 = 2");
		puts("2 * 3 = 6");
		puts("6 * 4 = 24");
	}
	else if (n == 5) {
		puts("YES");
		puts("1 + 2 = 3");
		puts("5 - 3 = 2");
		puts("2 * 4 = 8");
		puts("8 * 3 = 24");
	}
	else {
		puts("YES");
		puts("1 * 2 = 2");
		puts("2 * 3 = 6");
		puts("6 * 4 = 24");
		for (int i = 5; i <= n; i += 2) {
			printf("%d - %d = 1\n", i + 1, i);
			printf("24 * 1 = 24");
		}
	}
}


#include <iostream>
using namespace std;
int main()
{
   long long int n;
    cin>>n;
    if(n<=3)
    cout<<"NO";
    else
    cout<<"YES";
 return 0;
}


//nagashbek599327235

#include <bits/stdc++.h>
#define br  break
#define off  exit( 0 )
#define cn   continue
#define rt   return
#define un   unsigned
#define do   double
#define cr   char
#define st   string
#define sc   scanf
#define pr   printf
#define mk   make_pair
#define pb   push_back
#define pf   push_front
#define p_f  pop_front
#define p_b  pop_back
#define ff   first
#define ss   second
#define vec  vector
#define gcd  __gcd
#define pi   acos( -1 )
#define ll   long long
#define N    200005
#define M    100000000
#define I    1000000000000000000
#define en                 printf( "\n" )
#define sqr( a )           ( ( a ) * ( a ) )
#define all( c )           ( c ).begin(), ( c ).end()
#define rev( c )           reverse( all( c ) )
#define srt( c )           sort( all( c ) )
#define mxx( x, y, z )     max( x, max( y, z ) )
#define mnn( x, y, z )     min( x, min( y, z ) )
#define mxn( x, y, z )     max( x, min( y, z ) )
#define mnx( x, y, z )     min( x, max( y, z ) )
#define dist( x, y, z, c ) sqrt( sqr( x - z ) + sqr( y - c ) )
#define speed              ios_base::sync_with_stdio( 0 ), cin.tie( 0 ), cout.tie( 0 )
#define toprun             ios_base::sync_with_stdio( 0 ), cin.tie( 0 )
using namespace std;
int n;
int main()
{
	cin >> n;
	if( n <= 3 )
    {
        cout << "NO";
        return 0;
    }
    cout << "YES" << endl;
    if( n % 2 == 0 )
    {
        cout << "1 * 2 = 2" << endl;
        cout << "2 * 3 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        for( int i = 5; i < n; i += 2 )
        {
            cout << i + 1 << " - " << i << " = 1" << endl;
            if( i > 5 )cout << "1 * 1 = 1" << endl;
        }
        if( n > 4 )cout << "1 * 24 = 24" << endl;
    }
    else
    {
        cout << "1 + 5 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        cout << "3 - 2 = 1" << endl;
        cout << "1 * 24 = 24" << endl;
        for( int i = 6; i < n; i += 2 )
        {
            cout << i + 1 << " - " << i << " = 1" << endl;
            if( i > 6 )cout << "1 * 1 = 1" << endl;
        }
        if( n > 5 )cout << "1 * 24 = 24" << endl;
    }
    return 0;
}


//nagashbek599327235

#include <bits/stdc++.h>
#define br  break
#define off  exit( 0 )
#define cn   continue
#define rt   return
#define un   unsigned
#define do   double
#define cr   char
#define st   string
#define sc   scanf
#define pr   printf
#define mk   make_pair
#define pb   push_back
#define pf   push_front
#define p_f  pop_front
#define p_b  pop_back
#define ff   first
#define ss   second
#define vec  vector
#define gcd  __gcd
#define pi   acos( -1 )
#define ll   long long
#define N    200005
#define M    100000000
#define I    1000000000000000000
#define en                 printf( "\n" )
#define sqr( a )           ( ( a ) * ( a ) )
#define all( c )           ( c ).begin(), ( c ).end()
#define rev( c )           reverse( all( c ) )
#define srt( c )           sort( all( c ) )
#define mxx( x, y, z )     max( x, max( y, z ) )
#define mnn( x, y, z )     min( x, min( y, z ) )
#define mxn( x, y, z )     max( x, min( y, z ) )
#define mnx( x, y, z )     min( x, max( y, z ) )
#define dist( x, y, z, c ) sqrt( sqr( x - z ) + sqr( y - c ) )
#define speed              ios_base::sync_with_stdio( 0 ), cin.tie( 0 ), cout.tie( 0 )
#define toprun             ios_base::sync_with_stdio( 0 ), cin.tie( 0 )
using namespace std;
int n;
int main()
{
	cin >> n;
	if( n <= 3 )
    {
        cout << "NO";
        return 0;
    }
    cout << "YES" << endl;
    if( n % 2 == 0 )
    {
        cout << "1 * 2 = 2" << endl;
        cout << "2 * 3 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        for( int i = 5; i < n; i += 2 )
        {
            cout << i + 1 << " - " << i << " = 1" << endl;
            if( i > 5 )cout << "1 * 1 = 1" << endl;
        }
        cout << "1 * 24 = 24" << endl;
    }
    else
    {
        cout << "1 + 5 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        cout << "3 - 2 = 1" << endl;
        cout << "1 * 24 = 24" << endl;
        for( int i = 6; i < n; i += 2 )
        {
            cout << i + 1 << " - " << i << " = 1" << endl;
            if( i > 6 )cout << "1 * 1 = 1" << endl;
        }
        cout << "1 * 24 = 24" << endl;
    }
    return 0;
}


//nagashbek599327235

#include <bits/stdc++.h>
#define br  break
#define off  exit( 0 )
#define cn   continue
#define rt   return
#define un   unsigned
#define do   double
#define cr   char
#define st   string
#define sc   scanf
#define pr   printf
#define mk   make_pair
#define pb   push_back
#define pf   push_front
#define p_f  pop_front
#define p_b  pop_back
#define ff   first
#define ss   second
#define vec  vector
#define gcd  __gcd
#define pi   acos( -1 )
#define ll   long long
#define N    200005
#define M    100000000
#define I    1000000000000000000
#define en                 printf( "\n" )
#define sqr( a )           ( ( a ) * ( a ) )
#define all( c )           ( c ).begin(), ( c ).end()
#define rev( c )           reverse( all( c ) )
#define srt( c )           sort( all( c ) )
#define mxx( x, y, z )     max( x, max( y, z ) )
#define mnn( x, y, z )     min( x, min( y, z ) )
#define mxn( x, y, z )     max( x, min( y, z ) )
#define mnx( x, y, z )     min( x, max( y, z ) )
#define dist( x, y, z, c ) sqrt( sqr( x - z ) + sqr( y - c ) )
#define speed              ios_base::sync_with_stdio( 0 ), cin.tie( 0 ), cout.tie( 0 )
#define toprun             ios_base::sync_with_stdio( 0 ), cin.tie( 0 )
using namespace std;
int n;
int main()
{
	cin >> n;
	if( n <= 3 )
    {
        cout << "NO";
        return 0;
    }
    cout << "YES" << endl;
    if( n % 2 == 0 )
    {
        cout << "1 * 2 = 2" << endl;
        cout << "2 * 3 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        for( int i = 5; i < n; i += 2 )
            cout << i + 1 << " - " << i << " = 1" << endl;
        cout << "1 * 24 = 24" << endl;
    }
    else
    {
        cout << "1 + 5 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        cout << "3 - 2 = 1" << endl;
        cout << "1 * 24 = 24" << endl;
        for( int i = 6; i < n; i += 2 )
            cout << i + 1 << " - " << i << " = 1" << endl;
        cout << "1 * 24 = 24" << endl;
    }
    return 0;
}


//nagashbek599327235

#include <bits/stdc++.h>
#define br  break
#define off  exit( 0 )
#define cn   continue
#define rt   return
#define un   unsigned
#define do   double
#define cr   char
#define st   string
#define sc   scanf
#define pr   printf
#define mk   make_pair
#define pb   push_back
#define pf   push_front
#define p_f  pop_front
#define p_b  pop_back
#define ff   first
#define ss   second
#define vec  vector
#define gcd  __gcd
#define pi   acos( -1 )
#define ll   long long
#define N    200005
#define M    100000000
#define I    1000000000000000000
#define en                 printf( "\n" )
#define sqr( a )           ( ( a ) * ( a ) )
#define all( c )           ( c ).begin(), ( c ).end()
#define rev( c )           reverse( all( c ) )
#define srt( c )           sort( all( c ) )
#define mxx( x, y, z )     max( x, max( y, z ) )
#define mnn( x, y, z )     min( x, min( y, z ) )
#define mxn( x, y, z )     max( x, min( y, z ) )
#define mnx( x, y, z )     min( x, max( y, z ) )
#define dist( x, y, z, c ) sqrt( sqr( x - z ) + sqr( y - c ) )
#define speed              ios_base::sync_with_stdio( 0 ), cin.tie( 0 ), cout.tie( 0 )
#define toprun             ios_base::sync_with_stdio( 0 ), cin.tie( 0 )
using namespace std;
ll n, m;
char c[ 505 ][ 505 ];
int main()
{
	cin >> n;
	if( n <= 3 )
    {
        cout << "NO";
        return 0;
    }
    cout << "YES" << endl;
    if( n % 2 == 0 )
    {
        cout << "1 * 2 = 2" << endl;
        cout << "2 * 3 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        for( int i = 5; i < n; i += 2 )
            cout << i + 1 << " - " << i << " = 1" << endl;
        cout << "1 * 24 = 24";
    }
    else
    {
        cout << "1 + 5 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        cout << "3 - 2 = 1" << endl;
        cout << "1 * 24 = 24" << endl;
        for( int i = 6; i < n; i += 2 )
            cout << i + 1 << " - " << i << " = 1" << endl;
        cout << "1 * 24 = 24";
    }
}


//nagashbek599327235

#include <bits/stdc++.h>
#define br  break
#define off  exit( 0 )
#define cn   continue
#define rt   return
#define un   unsigned
#define do   double
#define cr   char
#define st   string
#define sc   scanf
#define pr   printf
#define mk   make_pair
#define pb   push_back
#define pf   push_front
#define p_f  pop_front
#define p_b  pop_back
#define ff   first
#define ss   second
#define vec  vector
#define gcd  __gcd
#define pi   acos( -1 )
#define ll   long long
#define N    200005
#define M    100000000
#define I    1000000000000000000
#define en                 printf( "\n" )
#define sqr( a )           ( ( a ) * ( a ) )
#define all( c )           ( c ).begin(), ( c ).end()
#define rev( c )           reverse( all( c ) )
#define srt( c )           sort( all( c ) )
#define mxx( x, y, z )     max( x, max( y, z ) )
#define mnn( x, y, z )     min( x, min( y, z ) )
#define mxn( x, y, z )     max( x, min( y, z ) )
#define mnx( x, y, z )     min( x, max( y, z ) )
#define dist( x, y, z, c ) sqrt( sqr( x - z ) + sqr( y - c ) )
#define speed              ios_base::sync_with_stdio( 0 ), cin.tie( 0 ), cout.tie( 0 )
#define toprun             ios_base::sync_with_stdio( 0 ), cin.tie( 0 )
using namespace std;
int n;
int main()
{
	cin >> n;
	if( n <= 3 )
    {
        cout << "NO";
        return 0;
    }
    cout << "YES" << endl;
    if( n % 2 == 0 )
    {
        cout << "1 * 2 = 2" << endl;
        cout << "2 * 3 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        for( int i = 5; i < n; i += 2 )
        {
            cout << i + 1 << " - " << i << " = 1" << endl;
            if( i > 5 )cout << "1 * 1 = 1" << endl;
        }
        if( n > 4 )cout << "1 * 24 = 24" << endl;
    }
    else
    {
        cout << "1 + 5 = 6" << endl;
        cout << "4 * 6 = 24" << endl;
        cout << "3 - 2 = 1" << endl;
        cout << "1 * 24 = 24" << endl;
        for( int i = 6; i < n; i += 2 )
        {
            cout << i + 1 << " - " << i << " = 1" << endl;
            if( i > 6 )cout << "1 * 1 = 1" << endl;
        }
        cout << "1 * 24 = 24" << endl;
    }
    return 0;
}