#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
int cnt[1000010];
bool coret[1000010];
bool pcop = 1;
bool scop = 1;
bool prime[1000010];
int temp;
bool cek_prime(int now) {
  int x;
  if (now == 1) {
    return false;
  }
  for (x = 2; x <= sqrt(now); x++) {
    if (now % x == 0) {
      return false;
    }
  }
  return true;
}
void bangkitkan() {
  int x;
  for (x = 2; x <= 1000000; x++) {
    if (!coret[x]) {
      coret[x] = 1;
      prime[x] = 1;
      for (int y = x; y <= 1000000; y += x) {
        coret[y] = 1;
      }
    }
    if (x % 2) {
      x++;
    }
  }
}
void cek(int now) {
  int x;
  for (x = 1; x <= sqrt(now); x++) {
    if (now % x == 0) {
      if (cek_prime(x)) {
        cnt[x]++;
      }
      if (cek_prime(now / x) && x != now / x) {
        cnt[now / x]++;
      }
      if (cnt[x] > 1) {
        pcop = 0;
      }
      if (cnt[now / x] > 1) {
        pcop = 0;
      }
      if (cnt[x] == temp) {
        scop = 0;
      }
      if (cnt[now / x] == temp) {
        scop = 0;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  temp = n;
  while (n--) {
    int a;
    cin >> a;
    cek(a);
  }
  if (pcop) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (scop) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
