#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int A = 0;
  int B = 0;
  for (int i = 0, in; i < 6; i++) {
    cin >> in;
    (i < 3) ? A += in : B += in;
  }
  int N;
  cin >> N;
  if (A <= 5 && B <= 10) {
    if (N == 1) {
      cout << ((B == 0 ^ A == 0) || (A + B == 0) ? "YES" : "NO") << '\n';
    } else {
      cout << "YES" << '\n';
    }
    return 0;
  }
  while (N--) {
    if (A > 0) {
      if (A - 5 < 0)
        A = 0;
      else
        A -= 5;
    } else if (B > 0) {
      if (B - 10 < 0)
        B = 0;
      else
        B -= 10;
    }
  }
  cout << (A == 0 && B == 0 ? "YES" : "NO") << '\n';
  return 0;
}
