#include <bits/stdc++.h>
using namespace std;
  #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  #define int long long
  #define endl "\n"
  #define all(v) v.begin(),v.end()
  #define double long double
  #define trace1(x)                cerr<<#x<<": "<<x<<endl
  #define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
  #define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
  #define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
  #define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<< ": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
  #define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
  #define cases int testcases;cin>>testcases; while(testcases--)
  const int N = 200005;



int32_t main()
{


    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    IOS

    int n;
    cin >> n;

    vector<int> v(n);

    bool ok = true;

   	map<int,int> mp;


    for(int i = 0; i < n; i++)
    {
    	cin >> v[i];

    }


    for(int i = 0; i < n; i++)
    {
    	mp[v[i]]++;

    	for(int j = 2; j * j <= v[i]; j++)
    	{
    		if(v[i]%j == 0)
    		{
    			mp[j]++;
    			mp[v[i]/j]++;

    		}
    	}
    }

    for(auto i : mp)
    {
    	if(i.second > 1)
    	{
    		ok = false;
    		break;
    	}
    }

    if(ok)
    {
    	cout << "pairwise coprime";
    }
    else
    {
    	ok = true;

    	int gc = v[0];

    	for(int i = 1; i < n; i++)
    	{
    		gc = __gcd(gc,v[i]);
    	}

    	if(gc != 1)
    	{
    		ok = false;
    	}

    	if(ok)
    	{
    		cout << "setwise coprime";
    	}
    	else
    	{
    		cout << "not coprime";
    	}

    }




    return 0;
}
