#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7, INF = 1e18;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> nxt(1000010, 0), mp(1000010, 0);
    for (int i = 2; i * i <= 1000000; i++)
      if (!nxt[i]) {
        nxt[i] = i;
        for (int j = i * i; j <= 1000000; j += i)
          if (!nxt[j]) nxt[j] = i;
      }
    for (int i = 2; i <= 1000000; i++)
      if (!nxt[i]) nxt[i] = i;
    vector<long long> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    int g = a[0];
    int flag = 0;
    for (int i = 0; i < n; i++) {
      g = gcd(g, a[i]);
      long long sp = a[i];
      while (nxt[sp]) {
        if (mp[nxt[sp]] != a[i] && mp[nxt[sp]] != 0) {
          flag = 1;
          break;
        }
        mp[nxt[sp]] = a[i];
        sp /= nxt[sp];
      }
    }
    if (flag == 0)
      cout << "pairwise coprime\n";
    else if (g == 1)
      cout << "setwise coprime\n";
    else
      cout << "not coprime\n";
  }
  return 0;
}
