#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
const int MOD = 1000000007;
const int MOD1 = 998244353;
const int maxn = 100010;
const int lim = (int)1e9;
int ct;
bool prime[10 * maxn];
int p[10 * maxn];
void makeSieve() {
  for (int i = 2; i <= 10 * maxn; ++i) {
    if (!prime[i]) p[++ct] = i;
    for (int j = 1; j <= ct && p[j] * i <= 10 * maxn; ++j) {
      prime[p[j] * i] = true;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n = 0;
  cin >> n;
  vector<int> a(n);
  map<int, int> mp;
  for (auto &i : a) {
    cin >> i;
    ++mp[i];
  }
  makeSieve();
  for (int i = 1; i <= ct; ++i) {
    int x = p[i], sum = 0;
    for (int j = x; j <= 10 * maxn; j += x) sum += mp[j];
    if (sum == n) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (sum > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
}
