#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007, ans = 1;
int prime[1000010];
void fun() {
  prime[1] = 1;
  for (int i = 2; i < 1000001; i++) {
    if (prime[i] == 0) {
      for (int j = i; j < 1000001; j += i) {
        prime[j] = i;
      }
    }
  }
}
bool p[1000001];
int gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  fun();
  int n, m, a[200010] = {0};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i > 0) {
      m = gcd(a[i], m);
    } else {
      m = a[i];
    }
  }
  if (m > 1) {
    cout << "not coprime\n";
  } else {
    int f = 0;
    for (int i = 0; i < n; i++) {
      while (a[i] > 1) {
        int x = prime[a[i]];
        while (1) {
          if (a[i] % x == 0) {
            a[i] /= x;
          } else {
            break;
          }
        }
        if (p[x] != 0) {
          f = 1;
          break;
        } else {
          p[x] = 1;
        }
      }
    }
    if (f == 0) {
      cout << "pairwise coprime\n";
    } else {
      cout << "setwise coprime\n";
    }
  }
}
