#include <bits/stdc++.h>
using namespace std;
long long powr(long long b, long long m) {
  long long ans = 1;
  while (m > 0) {
    if (m % 2 == 1) {
      ans = (ans * b) % 1000000007;
    }
    b = (b * b) % 1000000007;
    m = m / 2;
  }
  return ans;
}
long long gcd1(long long a, long long b) {
  if (a == 0)
    return b;
  else {
    return gcd1(b % a, a);
  }
}
long long lcm(long long a, long long b) { return (a * b) / gcd1(a, b); }
long long mod1(long long a) {
  if (a < 0)
    return -1 * a;
  else {
    return a;
  }
}
bool isPrime(int num) {
  if (num == 1) return 0;
  for (int i = 2; i * i <= (num); i++) {
    if (num % i == 0) {
      return false;
      break;
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int f1 = 1;
  for (int y3 = 0; y3 < f1; y3++) {
    int n;
    cin >> n;
    map<long long, long long> mp1, mp2;
    long long a[n];
    for (long long i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    long long g = 0;
    for (int i = 0; i < n; i++) {
      g = gcd1(g, a[i]);
    }
    if (g > 1) {
      cout << "not coprime";
    } else {
      int flag = 0;
      for (int i = 0; i < n; i++) {
        if (a[i] == 1) continue;
        vector<long long> v;
        long long temp = a[i];
        for (int j = 2; j * j <= a[i]; j++) {
          if (temp % j == 0) {
            temp /= j;
            if (mp2[j] == 0) v.push_back(j);
            mp2[j] = 1;
            j--;
          }
          if (temp == 1) break;
        }
        for (int it = 0; it < v.size(); it++) {
          if (mp1[v[it]]) {
            flag = 1;
            break;
          }
          mp1[v[it]] = 1;
        }
        if (flag) break;
        mp2.clear();
      }
      if (!flag)
        cout << "pairwise coprime";
      else
        cout << "setwise coprime";
    }
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
