#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class T>
using V = vector<T>;
template <typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T> >;
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) { return a / GCD(a, b) * b; }
long long int pom(long long int a, long long int n, int m) {
  long long int x = 1;
  for (a %= m; n; n /= 2) n& 1 ? x = x * a % m : 0, a = a * a % m;
  return x;
}
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
int ddx[8] = {-1, 0, 1, 0, 1, 1, -1, -1};
int ddy[8] = {0, -1, 0, 1, 1, -1, 1, -1};
long long int cmp1(pair<pair<long long int, long long int>, long long int> a,
                   pair<pair<long long int, long long int>, long long int> b) {
  return a.first.second > b.first.second;
}
long long int cmp2(pair<long long int, long long int> a,
                   pair<long long int, long long int> b) {
  if (a.second != b.second)
    return a.second < b.second;
  else
    return a.first < b.first;
}
vector<long long int> prime(100000);
void makeprime() {
  int j, n = 29, i = 9, sqrtn;
  prime[0] = 2;
  prime[1] = 3;
  prime[2] = 5;
  prime[3] = 7;
  prime[4] = 11;
  prime[5] = 13;
  prime[6] = 17;
  prime[7] = 19;
  prime[8] = 23;
  while (i < 100000) {
    j = 0;
    sqrtn = sqrt(n);
    while (prime[j] <= sqrtn) {
      if (n % prime[j] == 0) break;
      j++;
    }
    if (prime[j] > sqrtn) {
      prime[i] = n;
      i++;
    }
    n += 2;
  }
}
int main(int argc, char* argv[]) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long int n;
  cin >> n;
  V<long long int> a(n);
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long int x = a[0];
  for (long long int i = 1; i < n; i++) {
    x = GCD(x, a[i]);
  }
  if (x != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  long long int even = 0;
  for (long long int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) even++;
  }
  if (even >= 2) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  sort((a).begin(), (a).end());
  makeprime();
  map<long long int, long long int> M;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < 100000; j++) {
      if (prime[j] * prime[j] > a[i]) break;
      if (a[i] % prime[j] == 0) {
        M[prime[j]]++;
        if (M[prime[j]] >= 2) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        while (a[i] % prime[j] == 0) a[i] /= prime[j];
        if (a[i] > 1) {
          M[a[i]]++;
          if (M[a[i]] >= 2) {
            cout << "setwise coprime" << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
