#include <bits/stdc++.h>
const int MAXN = 1e6 + 10;
const int mod = 1e9 + 7;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf = 0x3f3f3f3f;
using namespace std;
int n, a[MAXN];
unordered_map<int, int> mp;
int main() {
  scanf("%d", &n);
  int ans = 0, max1 = 0;
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i]), mp[a[i]]++, max1 = max(max1, a[i]);
  for (int i = 2; i <= max1; i++) {
    int num = 0;
    for (int j = i; j <= max1; j += i) {
      if (mp[j]) {
        num += mp[j];
      }
    }
    ans = max(num, ans);
  }
  if (ans == 1)
    printf("pairwise coprime\n");
  else if (ans < n)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
