#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
vector<int> prime;
int cnt[1000001];
void eratos(void) {
  bool isprime[1001];
  memset(isprime, true, sizeof(isprime));
  for (int i = 2; i <= sqrt(1e6); i++) {
    if (isprime[i]) {
      prime.push_back(i);
      for (int j = 2 * i; j <= sqrt(1e6); j += i) {
        isprime[j] = false;
      }
    }
  }
}
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, t;
  vector<int> v;
  int g = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> t;
    v.push_back(t);
  }
  for (int i = 0; i < n; i++) {
    g = gcd(g, v[i]);
  }
  if (g != 1) {
    cout << "not coprime" << '\n';
    return 0;
  }
  eratos();
  for (int i = 0; i < v.size(); i++) {
    long long int x = v[i];
    for (int j = 0; j < prime.size(); j++) {
      if (x == 1 || x < prime[j] * prime[j]) {
        break;
      }
      if (x % prime[j] == 0) {
        if (cnt[prime[j]] > 0) {
          cout << "setwise coprime" << '\n';
          return 0;
        }
        cnt[prime[j]]++;
        while (1) {
          if (x % prime[j] != 0) {
            break;
          }
          x /= prime[j];
        }
      }
      if (x > 1) {
        if (cnt[x] > 0) {
          cout << "setwise coprime" << '\n';
          return 0;
        }
        cnt[x]++;
      }
    }
  }
  cout << "pairwise coprime" << '\n';
  return 0;
}
