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

int main(){
  
  int a,b,c,d,e,k;
  cin >> a >> b >> c >> d >> e >> k;
  bool x = true;
  
  if( e-a>k || e-b>k || e-c>k || e-d>k || d-a>k || d-b>k || d-c>k || c-a>k || c-b>k || b-a>k ){
  
    x = false;
    
  }
  
  if( x ){
    
    cout << "Yay!" << endl;
    
  }
  
  else{
    
    cout << ":(" << endl;
    
  }
  
}

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;

int main() {
  int H1, M1, H2, M2, K;
  cin >> H1 >> M1 >> H2 >> M2 >> K;

  cout << (H2 - H1) * 60 + M2 - M1 - K << endl;
  return 0;
}