#include <bits/stdc++.h>
using namespace std;
int prime[1000];
void init_prime(void) {
  int isPrime[1001];
  for (int i = 0; i < 1001; i++) {
    isPrime[i] = 1;
  }
  int temp;
  for (int i = 2; i <= 32; i++) {
    if (isPrime[i] == 0) {
      continue;
    }
    temp = i;
    while (temp + i < 1001) {
      isPrime[temp + i] = 0;
      temp += i;
    }
  }
  int index = 0;
  for (int i = 2; i < 1001; i++) {
    if (isPrime[i] == 1) {
      prime[index] = i;
      index++;
    }
  }
  return;
}
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  init_prime();
  int temp = 0;
  for (int i = 0; prime[i] != 0; i++) {
    temp = 0;
    for (int j = 0; j < N; j++) {
      if (A[j] % prime[i] == 0) {
        temp++;
        while (A[j] % prime[i] == 0) {
          A[j] /= prime[i];
        }
      }
    }
    if (temp == N) {
      cout << "not coprime" << endl;
      return 0;
    } else if (temp > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  map<int, int> r;
  for (int j = 0; j < N; j++) {
    if (A[j] != 1) {
      r[A[j]]++;
    }
  }
  for (auto it = r.begin(); it != r.end(); it++) {
    pair<int, int> t = *it;
    if (t.second == N) {
      cout << "not coprime" << endl;
      return 0;
    } else if (t.second > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
