#include <bits/stdc++.h>
using namespace std;
int prime[100000];
void init_prime(void) {
  bool isPrime[1000001];
  for (int i = 0; i < 1000001; i++) {
    isPrime[i] = true;
  }
  int temp;
  for (int i = 2; i <= (int)sqrt(1000001) + 1; i++) {
    if (isPrime[i] == false) {
      continue;
    }
    temp = i;
    while (temp + i < 1000001) {
      isPrime[temp + i] = false;
      temp += i;
    }
  }
  int index = 0;
  for (int i = 2; i < 1000001; i++) {
    if (isPrime[i]) {
      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++;
      }
    }
    if (temp == N) {
      cout << "not coprime" << endl;
      return 0;
    } else if (temp > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
