#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;
}
int main() {
  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]));
    dCount[a[i]]++;
    if (dCount[a[i]] >= 2) {
      pairWisePrime = false;
    }
    if (dCount[a[i]] >= n) {
      setWisePrime = false;
    }
  }
  for (int p = 2; p < 1010; p++) {
    int pCount = getPCount(p);
    if (pCount >= 2) {
      pairWisePrime = false;
    }
    if (pCount >= n) {
      setWisePrime = false;
    }
  }
  if (pairWisePrime) {
    printf("pairwise coprime\n");
    return 0;
  }
  if (setWisePrime) {
    printf("setwise coprime\n");
    return 0;
  }
  printf("not coprime\n");
  return 0;
}
