#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000001;
int main() {
  int x, t, a, b, da, db;
  (scanf("%d %d %d", &(x), &(t), &(a)) == 3);
  (scanf("%d %d %d", &(b), &(da), &(db)) == 3);
  bool can = !x;
  for (int i = 0; i < (t); ++i) {
    for (int j = 0; j < (t); ++j) {
      int aa = a - i * da;
      int bb = b - j * db;
      can |= aa == x || bb == x || aa + bb == x;
    }
  }
  puts((can) ? "YES\n" : "NO\n");
}
