#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int n;
int a[1000000];
map<int, int> mp;
bool isPrime[1000001];
int cnt[1000001];
signed main() {
  int i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", a + i);
    mp[a[i]]++;
  }
  int MAX = 1000000;
  for (i = 2; i <= MAX; i++) isPrime[i] = true;
  for (i = 2; i <= MAX; i++) {
    if (isPrime[i]) {
      cnt[i] += mp[i];
      for (j = i * 2; j <= MAX; j += i) {
        isPrime[j] = false;
        cnt[i] += mp[j];
      }
    }
  }
  for (i = 2; i <= MAX; i++) {
    if (cnt[i] >= 2) break;
  }
  if (i > MAX) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = a[0];
  for (i = 0; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
