#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define fsp(x) cout << fixed << setprecision(x)
const ll inf = LLONG_MAX;
const long double pi = M_PI;
void Yes() {cout << "Yes" << endl;}
void No() {cout << "No" << endl;}
void YES() {cout << "YES" << endl;}
void NO() {cout << "NO" << endl;}

int main() {
  ll a, b, c;
  cin >> a >> b >> c;
  if ((a <= c && c <= b) || (a >= c && c >= b)) Yes();
  else No();
}
#include <stdio.h>

int main (){
	int N;
	scanf ("%d", &N);
	
	if (N % 10 == 7 || (N/10)%10 == 7 || N /100 == 7){
		puts ("Yes");
	}
	else {
		puts ("No");
	}
	return 0;
}