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

typedef pair<int, int> P;
typedef long long ll;

#define rep(i, n) for(int i = 0; i < (n); i++)
#define repto(i, n) for(int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#define pb push_back
#define mp make_pair
#define INF 1145141919
#define MOD 1000000007
#define DEBUG(x) cout << #x << ": " << x << endl;
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }

int N;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin >> N;
  vector<int> A(N);
  int a = 0;
  rep(i, N) {
    cin >> A[i];
    a = max(a, A[i]);
  }
  vector<int> prime;
  vector<bool> is_prime(a+1);
  vector<int> D(a+1);
  D[1] = 1;
  int b1 = 0;
  int b2 = 0;
  b1 = A[N-1];
  rep(i, N-1) {
    b1 = gcd(b1, A[i]);
  }
  if (b1 != 1)
    cout << "not coprime" << endl;

  int p = 0;
  for (int i = 0; i <= a; i++)
    is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 0; i <= a; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      D[i] = i;
      p++;
      for (int j = 2 * i; j <= a; j+=i) {
        if (is_prime[j])
          D[j] = i;
        is_prime[j] = false;
      }
    }
  }
  // rep(i, a+1) {
  //   cout << D[i] << endl;
  // }
  vector<set<int>> s(a+1);
  rep (i, N) {
    int a2 = A[i];
    while(1) {
      if (a2 == D[a2]) {
        S[D[a2]].insert(A[i]);
        break;
      }
      else {
        s[D[a2]].insert(A[i]);
        a2 /= D[a2];
      }
    }
  }
  rep(i, a+1) {
    // cout << s[i].size() << endl;
    if (s[i].size() >= 2) {
      b2 = 1;
    }
  }
  if (b1 == 1 && b2 == 1)
    cout << "setwise coprime" << endl;
  if (b2 != 1)
    cout << "pairwise coprime" << endl;
}

