#include <bits/stdc++.h>
using namespace std;
int nums[100010];
bool tempList[100001];
vector<int> prime;
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  tempList[0] = true;
  tempList[1] = true;
  for (int i = 2; i <= 100000; i++) {
    if (!tempList[i]) {
      prime.push_back(i);
      int cnt = i * 2;
      while (cnt <= 100000) {
        tempList[cnt] = true;
        cnt += i;
      }
    }
  }
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &nums[i]);
  }
  if (n < 10000) {
    bool flag = false;
    for (int i = 0; i < n - 1; i++) {
      for (int j = i + 1; j < n; j++) {
        if (gcd(nums[i], nums[j]) != 1) {
          flag = true;
          break;
        }
      }
      if (flag) {
        break;
      }
    }
    if (!flag) {
      printf("pairwise coprime");
      return 0;
    }
  }
  int gcdVal = nums[0];
  for (int i = 0; i < n; i++) {
    gcdVal = gcd(gcdVal, nums[i]);
  }
  if (gcdVal == 1) {
    printf("setwise coprime");
  } else {
    printf("not coprime");
  }
  return 0;
}
