#include <bits/stdc++.h>
using namespace std;
int flag1 = 1;
long long a[1000005];
long long x;
long long vis[1000005];
inline long long gcd(long long a, long long b) {
  return b == 0 ? a : gcd(b, a % b);
}
long long Gcd;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (i == 1) {
      Gcd = x;
    } else {
      Gcd = gcd(Gcd, x);
    }
    a[i] = x;
    int shang = sqrt(x);
    for (int j = 2; j <= shang; j++) {
      if (x % j == 0) {
        vis[j]++;
        if (vis[j] == 2) {
          flag1 = 0;
          break;
        }
      }
    }
  }
  long long Gcd = a[1];
  if (flag1 == 1) {
    cout << "pairwise coprime";
    return 0;
  } else {
    if (Gcd == 1) {
      cout << "setwise coprime";
      return 0;
    } else {
      cout << "not coprime";
      return 0;
    }
  }
}
