#include <bits/stdc++.h>
#define boost ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
//#define int long long
#define M 1000000007
#define eb emplace_back
#define watch(x) cout << (#x) <<" is "<< x <<"\n";


using namespace std;
//const int N = 1e6;

int32_t main(){
  boost;
  int tc = 1; //cin >> tc;
  while(tc--)
  {
    int n; cin >> n;
    int arr[n];
    for(int i=0; i<n; i++)
      cin >> arr[i];
    int gcd = __gcd(arr[0], arr[1]);
    for(int i=2; i<n; i++)
      gcd = __gcd(gcd, arr[i]);
    set<int>st;
    bool f = 0;
    for(int i=0; i<n; i++)
    {
      if(arr[i]%2 == 0)
      {
        if(st.find(2) != st.end())
        {
          f = 1;
          break;
        }
        else
        {
          st.insert(2);
          while(arr[i] && arr[i]%2 == 0)
            arr[i] /= 2;
        }
      }
      for(int i=3; i*i<=arr[i]; i+=2)
      {
        if(arr[i]%i == 0)
        {
          if(st.find(i) != st.end())
          {
            f = 1;
            break;
          }
          else
          {
            st.insert(i);
            while(arr[i] && arr[i]%i == 0)
              arr[i] /= i;
          }
        }
      }
    }
    if(!f)
      cout <<"pairwise coprime\n";
    else
    {
      if(gcd != 1)
        cout << "not coprime\n";
      else
        cout <<"setwise coprime\n";
    }
  }
}

