Problem: The great hero guards the country where Homer lives. The hero has attack power A and initial health value B. There are n monsters in front of the hero. The i-th monster has attack power a_i and initial health value b_i. 

The hero or a monster is said to be living, if his or its health value is positive (greater than or equal to 1); and he or it is said to be dead, if his or its health value is non-positive (less than or equal to 0).

In order to protect people in the country, the hero will fight with monsters until either the hero is dead or all the monsters are dead.

  * In each fight, the hero can select an arbitrary living monster and fight with it. Suppose the i-th monster is selected, and the health values of the hero and the i-th monster are x and y before the fight, respectively. After the fight, the health values of the hero and the i-th monster become x-a_i and y-A, respectively. 



Note that the hero can fight the same monster more than once.

For the safety of the people in the country, please tell them whether the great hero can kill all the monsters (even if the great hero himself is dead after killing the last monster).

Input

Each test contains multiple test cases. The first line contains t (1 ≤ t ≤ 10^5) — the number of test cases. Description of the test cases follows.

The first line of each test case contains three integers A (1 ≤ A ≤ 10^6), B (1 ≤ B ≤ 10^6) and n (1 ≤ n ≤ 10^5) — the attack power of the great hero, the initial health value of the great hero, and the number of monsters.

The second line of each test case contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^6), where a_i denotes the attack power of the i-th monster.

The third line of each test case contains n integers b_1, b_2, ..., b_n (1 ≤ b_i ≤ 10^6), where b_i denotes the initial health value of the i-th monster.

It is guaranteed that the sum of n over all test cases does not exceed 10^5.

Output

For each test case print the answer: "YES" (without quotes) if the great hero can kill all the monsters. Otherwise, print "NO" (without quotes).

Example

Input


5
3 17 1
2
16
10 999 3
10 20 30
100 50 30
1000 1000 4
200 300 400 500
1000 1000 1000 1000
999 999 1
1000
1000
999 999 1
1000000
999


Output


YES
YES
YES
NO
YES

Note

In the first example: There will be 6 fights between the hero and the only monster. After that, the monster is dead and the health value of the hero becomes 17 - 6 × 2 = 5 > 0. So the answer is "YES", and moreover, the hero is still living.

In the second example: After all monsters are dead, the health value of the hero will become 709, regardless of the order of all fights. So the answer is "YES".

In the third example: A possible order is to fight with the 1-st, 2-nd, 3-rd and 4-th monsters. After all fights, the health value of the hero becomes -400. Unfortunately, the hero is dead, but all monsters are also dead. So the answer is "YES".

In the fourth example: The hero becomes dead but the monster is still living with health value 1000 - 999 = 1. So the answer is "NO".

Solution (in CPP):

Solution:
//#define _USE_MATH_DEFINES

#include<bits/stdc++.h>
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
using namespace std;
#define ll long long
#define endl "\n"
#define f first
#define s second
#define ar array
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define sz(X) ((int)(X).size())
#define rsz resize
#define pcnt __builtin_popcount
#define sort_unique(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define get_pos(c, x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define all(X) (X).begin(), (X).end()
#define rall(X) (X).rbegin(), (X).rend()
#define ms(c, x)  memset(c,x,sizeof c)
#define  No(x) cout<<(x?"NO":"No")<<endl
#define  Yes(x) cout<<(x?"YES":"Yes")<<endl
#define  nl cout<<endl;
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define fore(i, l, r) for(int i = l; i <r; i++)
#define fored(i, l, r) for(int i = r-1; i >=l; i--)
#define ford(i, n) for (int i = n - 1; i >= 0; --i)
using ld = long double;
using ul = unsigned long long;
using db = double;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = vector<ld>;
using vs = vector<string>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
template<typename T, size_t size>
using va = vector<ar<T, size>>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

template<typename A, typename B>
istream &operator>>(istream &in, pair<A, B> &p) {
    return in >> p.first >> p.second;
}

template<typename T>
istream &operator>>(istream &in, vector<T> &vec) {
    for (auto &x : vec) {
        in >> x;
    }
    return in;
}

template<typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    for (const auto &x : v) os << x << ' ';
    return os;
}

template<typename T, size_t size>
ostream &operator<<(ostream &os, const array<T, size> &arr) {
    for (const auto &x : arr) os << x << ' ';
    return os;
}

template<typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
    return os << p.first << " " << p.second;
}

template<class T>
bool ckmin(T &a, const T &b) { return b < a ? a = b, 1 : 0; }

template<class T>
bool ckmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

void debug() { cerr << endl; }

template<typename Head, typename... Tail>
void debug(Head H, Tail... T) {
    cerr << ' ' << H;
    debug(T...);
}

#ifdef LOCAL
#define dbg(...) cerr <<__LINE__<<" [[DEBUG]] "<<"(" << #__VA_ARGS__ << "):", debug(__VA_ARGS__)
#else
#define dbg(...)
#endif

const ll mod = 1e9 + 7;
//const int mod = 998244353;
const ll INF = 2e18 + 6;


inline ll modPow(ll x, ll y, ll mod) {
    ll res = 1;
    x = x % mod;;
    while (y > 0) {
        if (y & 1) {
            res = (res * x) % mod;
        }
        y = y >> 1;
        x = (x * x) % mod;

    }
    return res;
}

int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
char dirs[4] = {'R', 'D', 'L', 'U'};
unordered_map<char, int> rdirs = {{'R', 0},
                                  {'D', 1},
                                  {'L', 2},
                                  {'U', 3}};

void solve() {
    ll a, b, n;
    cin >> a >> b >> n;
    vpi in(n);
    forn(i,n)cin>>in[i].f;
    forn(i,n)cin>>in[i].s;
    sort(all(in));
    forn(i, n) {
        ll times = (in[i].s+a-1) / a;
        b -= (times-1) * in[i].f;
        if(b <=0)
        {
            No(1);
            return;
        }
        b-=in[i].f;
        if(b<0&&i!=n-1){
            No(1);
            return;
        }
    }
    Yes(1);
}

int main() {

    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(6);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int t = 1, tc = 1;
    cin >> t;
    while (t--) {
//        cout<<"Case #"<<tc<<": " ;
        solve();
        tc++;
    }
#ifdef LOCAL
    cerr << endl << "Time elapsed : " << clock() * 1000.0 / CLOCKS_PER_SEC << " ms" << '\n';
#endif
    return 0;
}
//NOTES
//look if it requires ll
// read the statement carefully
// check array bounds and cases for n=1