#include <bits/stdc++.h>
using namespace std;
long long int mpow(long long int a, long long int b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0) {
    long long int memo = mpow(a, b / 2);
    return memo * memo % (long long int)(1e9 + 7);
  } else
    return mpow(a, b - 1) * a % (long long int)(1e9 + 7);
}
long long int lpow(long long int a, long long int b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0) {
    long long int memo = lpow(a, b / 2);
    return memo * memo;
  } else
    return lpow(a, b - 1) * a;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
vector<long long int> kaijo_memo;
long long int kaijo(long long int n) {
  if (kaijo_memo.size() > n) return kaijo_memo[n];
  if (kaijo_memo.size() == 0) kaijo_memo.push_back(1);
  while (kaijo_memo.size() <= n)
    kaijo_memo.push_back(kaijo_memo[kaijo_memo.size() - 1] * kaijo_memo.size() %
                         (long long int)(1e9 + 7));
  return kaijo_memo[n];
}
vector<long long int> gyaku_kaijo_memo;
long long int gyaku_kaijo(long long int n) {
  if (gyaku_kaijo_memo.size() > n) return gyaku_kaijo_memo[n];
  if (gyaku_kaijo_memo.size() == 0) gyaku_kaijo_memo.push_back(1);
  while (gyaku_kaijo_memo.size() <= n)
    gyaku_kaijo_memo.push_back(
        gyaku_kaijo_memo[gyaku_kaijo_memo.size() - 1] *
        mpow(gyaku_kaijo_memo.size(), (long long int)(1e9 + 7) - 2) %
        (long long int)(1e9 + 7));
  return gyaku_kaijo_memo[n];
}
long long int nCr(long long int n, long long int r) {
  if (n == r) return 1;
  if (n < r || r < 0) return 0;
  long long int ret = 1;
  if (n <= 1e7) {
    ret *= kaijo(n);
    ret %= (long long int)(1e9 + 7);
    ret *= gyaku_kaijo(r);
    ret %= (long long int)(1e9 + 7);
    ret *= gyaku_kaijo(n - r);
    ret %= (long long int)(1e9 + 7);
  } else {
    for (int i = 0; i < (int)(r); i++) {
      ret *= n - i;
      ret %= (long long int)(1e9 + 7);
      ret *= mpow(r - i, (long long int)(1e9 + 7) - 2);
      ret %= (long long int)(1e9 + 7);
    }
  }
  return ret;
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(15);
  long long int n;
  cin >> n;
  vector<long long int> as(n);
  long long int nn = 0;
  for (int i = 0; i < (int)(n); i++) {
    cin >> as[i];
    nn = max(nn, as[i]);
  }
  if (nn > 10000) {
    nn = 10000;
  }
  vector<int> ps(nn);
  for (int i = 0; i < (int)(nn); i++) {
    ps[i] = i + 1;
  }
  ps.erase(ps.begin());
  vector<long long int> cs;
  while (1) {
    int p = ps[0];
    int s = ps.size();
    for (int j = 0; j < (int)(s); j++) {
      if (ps[j] % p == 0) {
        ps.erase(ps.begin() + j);
        j--;
        s--;
      }
    }
    int c = 0;
    for (int i = 0; i < (int)(n); i++) {
      if (as[i] % p == 0) {
        c++;
      }
    }
    cs.push_back(c);
    if (ps.size() == 0) break;
  }
  int f = 0;
  for (int i = 0; i < (int)(cs.size()); i++) {
    if (cs[i] > 1) {
      f = 1;
    }
    if (cs[i] == n) {
      f = 2;
      break;
    }
  }
  if (f == 0) {
    cout << "pairwise coprime" << endl;
  } else if (f == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
