#include <bits/stdc++.h>
using namespace std;
long long prime[1000010];
long long cnt[1000010];
long long gcd(long long a, long long b) {
  if (b == 0) {
    return (a);
  }
  return (gcd(b, a % b));
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  for (long long i = 2; i <= 1000000; i++) {
    if (prime[i] == 0) {
      for (long long j = i * 2; j <= 1000000; j += i) {
        prime[j] = 1;
      }
    }
  }
  long long n;
  cin >> n;
  long long a[n];
  long long all = -1;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (all == -1) {
      all = a[i];
    }
    all = gcd(all, a[i]);
  }
  long long flag = 0;
  for (long long i = 0; i < n && flag == 0; i++) {
    for (long long j = 2; j <= sqrt(a[i]) && flag == 0; j++) {
      if (a[i] % j == 0) {
        if (prime[j] == 0) {
          cnt[j]++;
          if (cnt[j] > 1) {
            flag = 1;
          }
        }
        if (j != a[i] / j && prime[a[i] / j] == 0) {
          cnt[a[i] / j]++;
          if (cnt[j] > 1) {
            flag = 1;
          }
        }
      }
    }
  }
  if (all == 1 && flag == 0) {
    cout << "pairwise coprime" << endl;
  } else if (all == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
