#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000010];
int dCount[1000010];
bool pairWisePrime;
bool setWisePrime;
int getPCount(int pNum) {
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] % pNum == 0) {
      count++;
    }
  }
  return count;
}
std::vector<int> primes;
void init() {
  bool isPrime[1010];
  for (int i = 2; i <= 1010; i++) {
    isPrime[i] = true;
  }
  int p = 2;
  while (p <= 1010) {
    if (isPrime[p] == true) {
      primes.push_back(p);
      long long curNum = p;
      int j = 2;
      while (true) {
        curNum = p * j;
        if (curNum > 1010) break;
        isPrime[curNum] = false;
        j++;
      }
    }
    p++;
  }
}
int main() {
  init();
  for (int i = 0; i < 1000010; i++) dCount[i] = 0;
  scanf("%d", &n);
  pairWisePrime = true;
  setWisePrime = true;
  for (int i = 0; i < n; i++) {
    scanf("%d", &(a[i]));
    if (a[i] == 1) continue;
    dCount[a[i]]++;
    if (dCount[a[i]] >= 2) {
      pairWisePrime = false;
    }
    if (dCount[a[i]] >= n) {
      setWisePrime = false;
    }
  }
  if (setWisePrime == true) {
    for (int p = 0; p < primes.size(); p++) {
      int pNum = primes[p];
      int pCount = getPCount(pNum);
      if (pCount >= 2) {
        pairWisePrime = false;
      }
      if (pCount >= n) {
        setWisePrime = false;
        break;
      }
    }
  }
  if (pairWisePrime) {
    printf("pairwise coprime\n");
    return 0;
  }
  if (setWisePrime) {
    printf("setwise coprime\n");
    return 0;
  }
  printf("not coprime\n");
  return 0;
}
