#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Graf = vector<vector<int>>;
class Calc_Mod {
 public:
  unsigned int mod = 1000000007;
  ll plus_mod(ll a, ll b) { return (a + b) % mod; }
  ll minus_mod(ll a, ll b) { return (a - b) % mod; }
  ll multi_mod(ll a, ll b) { return a * b % mod; }
  ll LSM(ll a, int b) {
    queue<int> q;
    while (b >= 1) {
      q.push(b % 2);
      b /= 2;
    }
    ll ans = 1;
    while (!q.empty()) {
      if (q.front() == 1) {
        ans = multi_mod(ans, a);
      }
      a = multi_mod(a, a);
      q.pop();
    }
    return ans;
  }
  ll div_mod(ll a, ll b) { return multi_mod(a, LSM(b, mod - 2)); }
  ll combi(ll a, ll b) {
    ll ans = 1;
    ll kaijo = 1;
    for (int i = 0; i < (b); ++i) {
      ans = multi_mod(ans, a - i);
      kaijo = multi_mod(kaijo, b - i);
    }
    ans = div_mod(ans, kaijo);
    return ans;
  }
};
int gcd(int x, int y) {
  if (x < y) swap(x, y);
  int r;
  while (y > 0) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  vector<bool> num(1000000, false);
  bool flag = false;
  for (int i = 0; i < (n); ++i) {
    int j = 1;
    while (a[i] * j < 1000000) {
      if (a[i] != 1) {
        if (num[a[i] * j] == false)
          num[a[i] * j] = true;
        else if (j == 1) {
          flag = true;
          break;
        }
      }
      ++j;
    }
    if (flag == true) {
      break;
    }
  }
  if (flag == false) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int ans = a[0];
  for (int i = 0; i < (n - 1); ++i) {
    ans = gcd(ans, a[i + 1]);
  }
  if (ans == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
