#include <iostream>
#include <vector>
#include <map>
#include <cmath>
 
using namespace std;
typedef long long int ll;

int N;

int mod = 1000000007;

map<int, int> lcm(map<int, int>, map<int, int>);
map<int, int> vdiv(map<int, int>, map<int, int>);
map<int, int>fact(int );
int vmod(map<int, int>, int);
int toInt(map<int, int>, int);
int xgcd(int, int, int &, int &);
int modinv(int, int);
ll modInverse(ll, ll);

vector<int> pr={2,3,5,7};

bool isprime(int n) {
  int i;
  int prime(int);
  int sz=pr.size();
  int sq = sqrt(n);
  for (i=1; i<sz; i++) {
    int p=pr[i];
    if (p>sq) return true;
    if (n%p==0) return false;
  }
  for (;;i++) {
    int p=prime(i);
    if (p>sq) return true;
    if (n%p==0) return false;
  }
}
int prime(int n) {
  int last = pr.size();
  if (n<last) return pr[n];

  for (int p=pr.back()+2; last <= n; p+=2) {
    if (isprime(p)) {
      last++;
      pr.push_back(p);
    }
  }
  return pr.back();
}

void printv(map<int, int> v) {
  for (auto itr=v.begin(); itr!=v.end(); itr++) {
    printf("*%d^%d", itr->first, itr->second);
  }
  printf("\n");
}

map<int, int> lc;

int main()
{
  int i,j;
  ll ret=0;
  ll B;

//printf("xgcd(%d,%d) = %d ", 10, 12, xgcd(10,12, i, j));
//printf("x0=%d, y0=%d\n", i, j);
  /*
cin >> i >> j;
printf("modinv(%d, %d) = %d\n", i, j, modinv(i,j));
printf("modInverse(%d, %d) = %d\n", i, j, modInverse(i,j));
    */

  cin >> N;
  vector<map<int, int>> A(N);
  for (i=0; i<N; i++) {
    ll a;
    cin >> a;
    A[i] = fact(a);
//printf("%d = A[%d] = ", a, i ); printv(A[i]); fflush(stdout);
  }
//printf("A[0] = "); printv(A[0]); fflush(stdout);

//printf("lc(%d)=", lc.size()); printv(lc); fflush(stdout);

  ret=0;
  int lmod = vmod(lc, mod);
//printf("lmod = %d\n", lmod);
  for (i=0; i<N; i++) {
    int ma = vmod(A[i], mod);
//printf("[%d] ma = %d ", i, ma);
    ll ma1 = modInverse(ma, mod);
//printf("ma1 = %lld ", ma1);
    int mb = (ma1*lmod)%mod;
//printf("mb = %d\n", mb);
    ret += mb;
    ret %= mod;
  }

  printf("%lld\n", ret);

  return 0;
}

map<int, int> fact(int n) {
  int p;
  map<int, int> ret;
  int base, ix;

  int i;
  for (i=0; n>1; i++) {
    base = prime(i);
    ix = 0;
    while (n%base == 0) {
      ix++;
      n /= base;
    }
    if (ix > 0) {
//printf("%d^%d\n", pa.first, pa.second);
      ret[base] = ix;
      auto itr = lc.find(base);
      if (itr == lc.end()) {
        lc[base] = ix;
      } else {
        lc[base] = max(ix, lc[base]);
      }
//printf("lc[%d]=%d\n", base, lc[base]);
    } else {
      if (base * base >= n) {
//printf("%d^%d\n", n, 1);
        ret[n] = 1;
        auto itr = lc.find(n);
        if (itr == lc.end()) {
          lc[n] = 1;
        } else {
          lc[n] = max(1, lc[n]);
        }
//printf("lc[%d]=%d\n", n, lc[n]);
        break;
      }
    }
  }
  return ret;
}
map<int, int> lcm(map<int, int> m, map<int, int> n) {
  map<int, int> ret;

  for (auto itm=m.begin(); itm!=m.end(); itm++) {
    auto itn = n.find(itm->first);
    if (itn == n.end()) {
      ret[itm->first] = itm->second;
    } else {
      ret[itm->first] = max(itm->second, itn->second);
      n.erase(itm->first);
    }
  }
  for (auto itn=n.begin(); itn!=n.end(); itn++) {
    ret[itn->first] = itn->second;
  }

  return ret;
}

map<int, int> vdiv(map<int,int> m, map<int, int> n) {
  map<int, int> ret;

  for (auto itm=m.begin(); itm!=m.end(); itm++) {
    auto itn = n.find(itm->first);
    if (itn == n.end()) {
      ret[itm->first] = itm->second;
    } else {
      ret[itm->first] = itm->second - itn->second;
      n.erase(itm->first);
    }
  }
  for (auto itn=n.begin(); itn!=n.end(); itn++) {
    ret[itn->first] = -itn->second;
  }
  return ret;
}
int toInt(map<int, int> f, int m) {
  ll lret=1;

  for (auto itr=f.begin(); itr != f.end(); itr++) {
    for (int j=0; j<itr->second; j++) {
      lret *= itr->first;
      lret %= m;
    }
  }
  return lret;
}
int vmod(map<int, int> v, int m) {
//printf("vmod()\n");
  ll r=1;
  for (auto itr=v.begin(); itr != v.end(); itr++) {
//printf(" %d^%d\n", itr->first, itr->second);
    for (int i=0; i<itr->second; i++) {
      r = itr->first*r%m;
//printf(" base=%d, r=%lld\n", itr->first, r);
    }
  }
//printf("vmod()=%d\n", (int)r);
  return r;
}
int gcd(int m, int n) {
  if (m<n) swap(m, n);
  while (m%n) {
    m%=n;
    swap(m, n);
  }
  return n;
}
int xgcd(int a, int b, int &x0, int &y0) {
  x0=1, y0=0;
  int x1=0, y1=1;
  int q;
  int at, x0t, y0t;
  while (b != 0) {
    q = a/b;
    at = b;
    b = a%b;
    a = at;
    x0t = x1;
    x1 = x0-q*x1;
    x0 = x0t;
    y0t = y1;
    y1 = y0-q*y1;
    y0 = y0t;
  }
  return a;
}
int modinv(int a, int m) {
  int g, x, y;
  g = xgcd(a, m, x, y);
  if (g != 1) return -1;
  return x%m;
}
ll power(ll x, ll y, ll p) {
  ll res = 1;
  x=x%p;
  while (y>0) {
    if (y&1) res = (res*x)%p;
    y = y>>1;
    x = (x*x) %p;
  }
  return res;
}
ll modInverse(ll a, ll m) {
  ll ans = power(a, m-2, m);
  return ans;
}

Measured memory_bytes: 3072