#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
#define per(i,n) for(int i = n-1; i >= 0; i--)
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
const long long mod = 1000000007LL;

ll GCD(ll a, ll b) {
  return b ? GCD(b, a%b) : a;
}

ll s[1100000];

bool isprime(int x) {
  int i;
  if(x < 2) return 0;
  else if(x == 2) return 1;
  if(x%2 == 0) return 0;
  for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
  return 1;
}

vector<int> enum_div(int n) {
  vector<int> ret;
  for(int i = 1; i*i <= n; i++) {
    if(n%i == 0) {
      ret.push_back(i);
      if(i != 1 && i*i != n) {
        if(s[i]) ret.push_back(n/i);
      }
    }
  }
  if(s[n]) ret.push_back(n);
  sort(ret.begin(), ret.end());
  return ret;
}

ll check[1100000];

int main() {
  ll n;
  cin >> n;
  vll a(n);
  rep(i,n) cin >> a[i];
  for(int i = 2; i<=1000000; i++) if(isprime(i)) s[i]=1;
  ll g = a[0];
  rep(i,n) g = GCD(g,a[i]);
  if(g!=1) {
    cout << "not coprime" << endl;
    return 0;
  }
  rep(i,n) {
    vll v = enum_div(a[i]);
    ll m = v.size();
    rep(j,m) {
      cout << v[j] << " ";
      cout << endl;
      if(check[v[j]]!=0) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      check[v[j]] = 1LL;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}