#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const int maxn = 1e6 + 7;
int a[maxn];
map<int, int> mp;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) {
    scanf("%d", &a[i]);
  }
  for (int i = (1); i <= (n); i++) {
    for (int j = 2; j <= a[i]; j++) {
      if (a[i] % j == 0) {
        mp[j]++;
        while (a[i] % j == 0) {
          a[i] /= j;
        }
      }
    }
  }
  int flag = 0;
  for (auto temp : mp) {
    if (temp.second >= 2) {
      flag++;
    }
  }
  if (flag == 0)
    puts("pairwise coprime");
  else if (flag == n)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
