#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long n;
long long a[1000005];
bool y[1000005];
bool x = false;
bool X = false;
long long gcd(long long a, long long b) {
  if (b % a == 0)
    return a;
  else
    return gcd(b % a, a);
}
long long p[100000];
long long pp = 0;
map<long long, long long> prime_factor(long long n) {
  map<long long, long long> res;
  for (long long i = 2; i * i <= n; i++) {
    bool w = true;
    while (n % i == 0) {
      res[i]++;
      n = n / i;
      if (w) {
        w = false;
        p[pp] = i;
        pp++;
      }
    }
  }
  if (n != 1) {
    res[n] = 1;
    p[pp] = n;
    pp++;
  }
  return res;
}
int main(void) {
  cin >> n;
  int I = 0;
  bool Y = false;
  bool YY = false;
  for (int i = 0; i < n; i++) {
    cin >> a[I];
    if (YY && a[I] == 1) {
      I--;
    }
    if (Y && a[I] == 1) {
      YY = true;
    }
    if (a[I] == 1) {
      Y = true;
    }
    I++;
  }
  if (I < 80000) {
    for (int i = 0; i < n; i++) {
      pp = 0;
      map<long long, long long> k = prime_factor(a[i]);
      for (int j = 0; j < pp; j++) {
        if (y[p[j]]) {
          X = true;
          break;
        } else {
          y[p[j]] = true;
        }
      }
      if (X) {
        break;
      }
    }
    if (X) {
    } else {
      cout << "pairwise coprime" << endl;
      return 0;
    }
  }
  long long g = a[0];
  for (int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
