//#include<bits/stdc++.h>
#include<map>
#include<queue>
#include<time.h>
#include<limits.h>
#include<cmath>
#include<ostream>
#include<iterator>
#include<set>
#include<stack>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define endl '\n'
#define rep_1(i,m,n) for(int i=m;i<=n;i++)
#define mem(st) memset(st,0,sizeof st)
//namespace first_space
//{
//	int a=10;
//	void func()
//	{
//		cout << "Inside first_space" << endl;
//	}
//}
int read()
{
	int res=0,ch,flag=0;
	if((ch=getchar())=='-')             //判断正负
		flag=1;
	else if(ch>='0'&&ch<='9')           //得到完整的数
		res=ch-'0';
	while((ch=getchar())>='0'&&ch<='9')
		res=res*10+ch-'0';
	return flag?-res:res;
}

typedef long long ll;
typedef pair<int,int> pii;
typedef unsigned long long ull;
typedef pair<double,double> pdd;
const int inf = 0x3f3f3f3f;
void solve()
{
	int a,b,c;
	cin>>a>>b>>c;
	if(a*a+b*b<c*c)
		cout<<"Yes"<<endl;
	else
		cout<<"No"<<endl;
}
signed main()
{
	int t=1; 
	while(t--)
		solve();
	return 0;
}

#pragma region 
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;         // long long と int64_t は同じ
const int INF = 0x3fffffff; // 10^9 より少し大きい 
#pragma endregion

ll point (map<ll, ll> f)
{
    ll a = 0;

    for (auto x : f)  a += x.first * pow(10, x.second);

    return a;
}

int main() {
    ll K;
    string S, T;
    cin >> K >> S >> T;

    map<ll, ll> s;
    map<ll, ll> t;
    map<ll, ll> remain;

    for (int i = 1; i <= 9; i++) {
        s[i] = 0, t[i] = 0, remain[i] = K; 
    }

    for (int i = 0; i <= 3; i++) {
        int a = S[i] - '0';
        s[a]++;
        remain[a]--;

        a = T[i] - '0';
        t[a]++;
        remain[a]--;
    }

    ll win = 0;

    for (int i = 1; i <= 9; i++) {
        for (int j = 1; j <= 9; j++) {
            if (i == j) {
                map<ll, ll> s_ = s, t_ = t;
                s_[i]++, t_[i]++;

                if (point(s_) > point(t_)) {
                    ll p = point(s_), q = point(t_);
                    win += remain[i] * (remain[i] - 1);                  
                }
            }

            if (i != j) {
                map<ll, ll> s_ = s, t_ = t;
                s_[i]++, t_[j]++;

                if (point(s_) > point(t_)) {
                    ll p = point(s_), q = point(t_);
                    win += remain[i] * remain[j];
                    }
            } 
        }
    }

    const ll total = 9 * K - 8;
   // double p = double(win) / total / (total - 1);
    cout << double(win) / total / (total - 1) << endl;
}
