#include <bits/stdc++.h>
#include <math.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define PI 3.14159265359
using namespace std;
using ll = long long;
using P = pair<int, int>;

int gcd(int a, int b) {
    return b == 0 ? a : gcd(b, a % b);
}

bool isPrime[1000];
bool isExist[1000000];
int a[1000000];

int main() {
  rep(i, 1000) { isPrime[i] = true; isExist[i] = false; }
  int n;
  cin >> n;

  int ans = 0;

  rep(i, n) {
    cin >> a[i];
    if (!isExist[a[i]]) isExist[a[i]] = true;
    else if (a[i] != 1) ans = 1;
  }

  for (int i = 2; i < 1000; i++) {
    if (isPrime[i]) {
      for (int j = 2 * i; j < 1000; j += i) {
        isPrime[j] = false;
      }
    }
  }

  int primeCount = 0;
  for (int i = 2; i < 1000000; i++) {
    if (isPrime[i]) {
      primeCount++;
      int dividable = 0;
      rep(j, n) {
        if (a[j] % i == 0) dividable++;
      }
      if (dividable >= 2) ans = 1;
    }
  }
  //cout << "the number of prime is " << primeCount << endl;
  if (ans == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }

  int g = a[0];
  rep(i, n - 1) {
    g = gcd(a[i + 1], g);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }

  cout << "not coprime" << endl;

  return 0;
}
/*
*/
