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

#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i,a,b) for (int i = a; i < b; i++)

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef string str;


int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	ll a,b,c;
	cin>>a>>b>>c;

    if(pow(a,2) + pow(b,2) < pow(c,2)){
        cout<<"Yes"<<"\n";
    }
    else{

        cout<<"No"<<"\n";
    }
	
	
	
	
}
#pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
 
using namespace std;
 
#define ll long long
 
// const ll p = 998244353;
const ll nax = 100001;

int binpow(int a, int n, int p) {
	if (!n) return 1;
	if (n & 1) return binpow(a, n - 1, p) * a % p;
	return binpow(a * a % p, n / 2, p);
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int a, b, c;
	cin >> a >> b >> c;
	a %= 10;
	if (a == 0 || a == 5) {
		cout << a;
		return 0;
	}
	vector<vector<int>> v = {{2, 4, 8, 6}, {4, 6}, {6}, {8, 4, 2, 6}};
	if (__gcd(a, 10) == 1) {
		b %= 4;
		cout << binpow(a, binpow(b, c, 4), 10);
		return 0;
	}
	a = a / 2 - 1;
	b %= v[a].size();
	int sh = binpow(b, c, v[a].size()) - 1;
	if (sh < 0) sh += v[a].size();
	cout << v[a][sh];
}

