#include <bits/stdc++.h>

using namespace std;

ifstream fi ("ntcn.inp");
ofstream fo ("ntcn.out");

int gcd(int a, int b) {
    int temp;
    while (b != 0)
    {
        temp = a % b;
        a = b;
        b = temp;
    }
    return a;
}

int main(){
  int n;
  fi>>n;
  int a[n],i,k,num=0;
  for (i=0;i<n;i++){fi>>a[i];}
  for (i=0;i<n;i++){
    for (k=i+1;k<n;k++){
        if (a[k]==a[i]){a[k]==1;}
        if (gcd(a[i],a[k])==1&&a[i]!=1&&a[k]!=1){num++;}

    }
  }
  fo<<num;
}
