#include <bits/stdc++.h>
using namespace std;
int m = 1000000007;
int addMod(int a, int b) { return (a % m + b % m) % m; }
int subMod(int a, int b) {
  int x = (a % m - b % m) % m;
  if (x < 0) {
    x += m;
  }
  return x;
}
int multMod(int a, int b) { return (int)(((long long)(a % m) * (b % m)) % m); }
int gcd(int a, int b) {
  while (b != 0) {
    if (a > b) {
      a = a - b;
    } else {
      b = b - a;
    }
  }
  return a;
}
int gcd(int arr[], int l, int r) {
  int n = r - l;
  if (n == 2) {
    return gcd(arr[l], arr[l + 1]);
  }
  return gcd(arr[l], gcd(arr, l + 1, r));
}
int lcm(int a, int b) { return multMod(a, b) / gcd(a, b); }
int lcm(int arr[], int l, int r) {
  int n = r - l + 1;
  if (n == 1) {
    return 1;
  }
  return lcm(arr[l], lcm(arr, l + 1, r));
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int mul = 1;
  for (int i = 0; i < n; i++) {
    mul = multMod(mul, a[i]);
  }
  int x = gcd(a, 0, n);
  int y = lcm(a, 0, n);
  if (y == mul) {
    cout << "pairwise coprime\n";
  } else if (x == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
