#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, v, g = 0;
  vector<int> a(1000001);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> v;
    a[v]++;
    g = gcd(v, g);
  }
  if (g != 1)
    cout << "not coprime";
  else {
    vector<char> prime(1000000 + 1, true);
    prime[0] = prime[1] = false;
    for (int i = 2; i <= 1000000; ++i) {
      if (prime[i]) {
        if (i * 1ll * i <= 1000000) {
          int cnt = 0;
          for (int j = i * i; j <= 1000000; j += i) {
            prime[j] = false;
            cnt += a[j];
          }
          if (cnt > 1) return cout << "setwise coprime", 0;
        }
      }
    }
    cout << "pairwise coprime";
  }
}
