#include <bits/stdc++.h>
#define endl "\n";
#define inf 1000000000000000;
using namespace std;
using ll = long long;
using ld = long double;
using db = double; 
using str = string;

using pi = pair<int,int>;
using pl = pair<ll,ll>;
using pd = pair<db,db>;

using vi = vector<int>;
using vii = vector<pi>;
using vll = vector<pl>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = vector<db>; 
using vs = vector<str>;
using vpi = vector<pi>;
using vpl = vector<pl>; 
using vpd = vector<pd>;
const ll BIG=998244353;//1000000007 
const double PI=3.141592653589793238;
#define FOR(i,a,b) for (ll i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (ll i = (b)-1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define trav(a,x) for (auto& a: x)
// pairs
#define mp make_pair
#define f first
#define s second
 
// vectors
#define sz(x) (int)(x).size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend() 
#define sor(x) sort(all(x)) 
#define rsz resize
#define ins insert 
#define ft front() 
#define bk back()
#define pf push_front 
#define pb push_back
#define eb emplace_back 
#define lb lower_bound 
#define ub upper_bound 
ll binpow(ll a,ll b,ll m)
{
    ll res=1;
    while(b>0){
        if(b&1){res=(res*a)%m;}
    b>>=1;a=(a*a)%m;
    }
    return res;
}
template <typename T,typename Q>
T max(T a,Q b)
{
	if(a>b)
		return a;
	return b;
    //return a+b-b^((a^b)&-(a<b));
}
template <typename T,typename Q>
T min(T a,Q b)
{
	if(a<b)
		return a;
	return b;
    //return b^((a^b)&-(a<b));
}
ll fact[1000001];
void precal()
{
	fact[0]=1;
	fact[1]=1;
	for(int i=2;i<=1e6;i++)
	{
		fact[i]=(fact[i-1]*i)%BIG;
	}
}
ll mod(ll a)
{
	return a%BIG;
	// return a-(BIG & -(a>=BIG));
}
ll imod(ll a)
{
	return binpow(a,BIG-2,BIG);
}
ll C(ll a,ll b)
{
	return mod(fact[a]*mod(imod(fact[a-b])*imod(fact[b])));
}
void solve()
{
	int n;cin>>n;
	vi v(n);
	trav(a,v) cin>>a;
	int p=-1,q=-1;
	for(int i=2;i<=1000;i++)
	{
		int t=0;
		trav(a,v)
		{
			if(a%i==0) t++;
		}
		if(t>p)
		{
			p=t;
			q=i;
		}
	}
	cout<<q;
}
int main() {
    int t;t=1;
    while(t--)
	{
		solve();
	}
	return 0;
}

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

int main() {

    long k;
    string s, t;
    cin >> k; 
    cin >> s >> t;

    int c[10] = {0};
    int d[10] = {0};
    for(int i = 0; i < 4; i++){
        int ss = s[i] - '0';
        int tt = t[i] - '0';
        c[ss]++;
        d[tt]++;         
    }


    long count = 0;
    for(int i = 1; i <= 9; i++){
        for(int j = 1; j <= 9; j++){

            int flag = 0;
            if(i == j){
                if(c[i]+d[i]+2 <= k){
                    flag = 1;
                }
            } else {
                if(c[i]+d[i]+1 <= k && c[j]+d[j]+1 <= k){
                    flag = 2;
                }
            }

            if(flag == 1 || flag == 2){
                long takahashi = 0 ;
                long aoki = 0 ;
                for(int k = 1; k <= 9; k++){

                    if(k == i){
                        takahashi += k*pow(10, c[k] + 1);
                    } else {
                        takahashi += k*pow(10, c[k]);
                    }
                    
                    if(k == j){
                        aoki += k*pow(10, d[k] + 1);
                    } else {
                        aoki += k*pow(10, d[k]);
                    }
                    
                }
                if(takahashi > aoki){
                    if(flag == 1) count += (k-c[i]-d[i]) * (k-c[j]-d[j]-1);
                    if(flag == 2) count += (k-c[i]-d[i]) * (k-c[j]-d[j]);
                    //cout << i << ' ' << j << endl;
                }
            }

        }
    }

    cout << setprecision(15) << (double)(count)/(double)((9*k-8)*(9*k-9)) << endl;
    
}
