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

// M A F I A - M A F I A - M A F I A - M A F I A - M A F I A - M A F I A //

#define int                                       long long
#define lop(i,s,e)                                for(int i=s;i<(int)e;i++)
#define rlop(i,e,s)                               for(int i=e;i>=s;i--)
#define prvec(v)                                  lop(R15,0,v.size())cout << v[R15] <<" "; cout << endl;
#define prarr(arr,s1,e1)                          lop(R15,s1,e1)cout << arr[R15] << " "; cout << endl;

#define endl                                      '\n'
#define ff                                        first
#define ss                                        second
#define pii                                       pair<int,int>

#define pb                                        push_back
#define all(v)                                    v.begin(),v.end()

// M A F I A - M A F I A - M A F I A - M A F I A - M A F I A - M A F I A //

const int N = 1e6 + 7, M = 1000000007, inf = INT_MAX;
const long long INF = LLONG_MAX;

int n, arr[N], freq[N];



void solve()
{
      cin >> n;

      int g = 0;
      lop(i, 0, n) cin >> arr[i], g = __gcd(arr[i], g);


      lop(i, 0, n)
      {
            freq[ arr[i] ]++;
      }


      int mx = 0;
      lop(i, 2, N)
      {
            int cnt = 0;
            for (int j = i; j < N; j += i) cnt += freq[j];
            // if (cnt) cout << cnt << endl;
            mx = max(mx, cnt);
      }

      if ( mx == 1 ) cout << "pairwise coprime" << endl;
      else if ( g == 1 ) cout << "setwise coprime" << endl;
      else cout << "not coprime" << endl;






}

int32_t main()
{
      ios_base::sync_with_stdio(0);   cin.tie(0);   cout.tie(0);

      int test = 1;
      // cin >> test;
      while (test--)solve();


}



















