#include<bits/stdc++.h>
using namespace std;

int main()
{
  int N;scanf("%d",&N);
  int A[N];
  for(int i=0;i<N;i++)scanf("%d",&A[i]);
  set<int> che;bool works=true;
  if(A[N-1]%2==0)che.insert(2);
  for(int i=3;i*i<=A[N-1];i+=2)if(A[N-1]%i==0)che.insert(i);
  for(int i=N-2;i>-1;i--)
  {
    if(A[i]%2==0){if(che.count(2))works=false;else che.insert(2);}
    for(int j=3;j*j<=A[i];j+=2)
    {
      if(A[i]%j==0)
      {
        if(che.count(j))works=false;
        che.insert(j);
      }
    }
  }
  if(works){printf("pairwise coprime");return 0;}
  int g=A[0];
  for(int i=1;i<N;i++)g=gcd(g,A[i]);
  if(g==1)printf("setwise coprime");
  else printf("notd coprime");
}