You have $a$ coins of value $n$ and $b$ coins of value $1$. You always pay in exact change, so you want to know if there exist such $x$ and $y$ that if you take $x$ ($0 \le x \le a$) coins of value $n$ and $y$ ($0 \le y \le b$) coins of value $1$, then the total value of taken coins will be $S$.

You have to answer $q$ independent test cases.


-----Input-----

The first line of the input contains one integer $q$ ($1 \le q \le 10^4$) — the number of test cases. Then $q$ test cases follow.

The only line of the test case contains four integers $a$, $b$, $n$ and $S$ ($1 \le a, b, n, S \le 10^9$) — the number of coins of value $n$, the number of coins of value $1$, the value $n$ and the required total value.


-----Output-----

For the $i$-th test case print the answer on it — YES (without quotes) if there exist such $x$ and $y$ that if you take $x$ coins of value $n$ and $y$ coins of value $1$, then the total value of taken coins will be $S$, and NO otherwise.

You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).


-----Example-----
Input
4
1 2 3 4
1 2 3 6
5 2 6 27
3 3 5 18

Output
YES
NO
NO
YES
[{"code": "q=int(input())\nfor t in range(q):\n    a,b,n,s=map(int,input().split())\n    v=min(a*n,s//n*n)\n    if s-v>b:\n        print(\"NO\")\n    else:\n        print(\"YES\")", "passed": true, "time": 0.15, "memory": 14236.0, "status": "done"}, {"code": "for __ in range(int(input())):\n    a, b, n, s = list(map(int, input().split()))\n    x = s % n\n    if x > b or a * n + b < s:\n        print('NO')\n    else:\n        print('YES')", "passed": true, "time": 0.15, "memory": 14228.0, "status": "done"}, {"code": "read = lambda: [int(i) for i in input().split()]\n\nq = int(input())\n\nfor _ in range(q):\n    a, b, n, S = read()\n    spend_a = min(a, S // n)\n    if S - spend_a * n > b:\n        print('NO')\n    else:\n        print('YES')", "passed": true, "time": 0.15, "memory": 14200.0, "status": "done"}, {"code": "Q = int(input())\n\nfor _ in range(Q):\n\ta, b, n, S = list(map(int, input().split()))\n\n\tleft = S - (min(a, S // n)) * n\n\n\tif left <= b:\n\t\tprint(\"YES\")\n\telse:\n\t\tprint(\"NO\")\n", "passed": true, "time": 0.22, "memory": 14252.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    a, b, n, S = list(map(int, input().split()))\n    if b >= S % n and a * n + b >= S:\n        print('YES')\n    else:\n        print('NO')\n", "passed": true, "time": 0.15, "memory": 14248.0, "status": "done"}, {"code": "q = int(input())\nfor i in range(q):\n    a, b, n, s = map(int, input().split())\n    k = s // n\n    if k > a:\n        p = a * n\n    else:\n        p = k * n\n    if s - p > b:\n        print(\"NO\")\n    else:\n        print(\"YES\")", "passed": true, "time": 0.15, "memory": 14196.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    a,b,n,s=map(int,input().split())\n    maxi=n*a  \n    rem=s%n \n    z=s//n*n \n    z=min(z,a*n)\n    if s-z<=b:\n        print('YES')\n    else:\n        print('NO')", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "q = int(input())\nfor i in range(q):\n    a, b, n, S = map(int, input().split())\n    if a * n >= S:\n        x = S // n\n    else:\n        x = a\n    if b >= S - x * n:\n        print('YES')\n    else:\n        print('NO')", "passed": true, "time": 0.22, "memory": 14076.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    a, b, n, s = map(int, input().split())\n    s -= min(a, s // n) * n\n    if b >= s:\n        print(\"YES\")\n    else:\n        print(\"NO\")", "passed": true, "time": 0.14, "memory": 14132.0, "status": "done"}, {"code": "q = int(input())\nwhile q:\n    a, b, n, s = [int(x) for x in input().split()]\n    s -= min((s//n), a)*n\n    if s <= b:\n        print('YES')\n    else:\n        print('NO')\n    q -= 1", "passed": true, "time": 0.17, "memory": 14068.0, "status": "done"}, {"code": "import sys\ninput = sys.stdin.readline\n\nq=int(input())\n\nfor testcases in range(q):\n    a,b,n,S=list(map(int,input().split()))\n\n    x=S//n\n\n    S-=min(x,a)*n\n\n    if S<=b:\n        print(\"YES\")\n    else:\n        print(\"NO\")\n", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "t=int(input())\nfor tt  in range(t):\n\ta,b,n,s=map(int,input().split())\n\ttemp=s//n \n\taa=min(temp,a)\n\ts-=(n*aa)\n\tif b>=s:\n\t\tprint(\"YES\")\n\telse:\n\t\tprint(\"NO\")", "passed": true, "time": 0.99, "memory": 14284.0, "status": "done"}, {"code": "n = int(input())\nfor _ in range(n):\n    a, b, n, s = map(int, input().split())\n    t = min(s//n, a)\n    if b >= s - t*n: print('YES')\n    else: print('NO')", "passed": true, "time": 0.16, "memory": 14120.0, "status": "done"}, {"code": "q = int(input())\nfor qi in range(q):\n    a, b, n, s = list(map(int, input().split()))\n    ac = s // n\n    ac = min(a, ac)\n    curs = ac * n\n    if s - curs <= b:\n        print(\"YES\")\n    else:\n        print(\"NO\")", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "num = int(input())\nfor testcase in range(1, num+1):\n    [a, b, n, S] = [int(i) for i in input().split()]\n    S-=(n*min(a, S//n))\n    if(S>b): print('NO')\n    else: print('YES')", "passed": true, "time": 0.14, "memory": 14348.0, "status": "done"}, {"code": "q = int(input())\nans = ['NO'] * q\nfor i in range(q):\n    a, b, n, s = map(int, input().split())\n    if a * n + b >= s and b >= s % n:\n        ans[i] = \"YES\"\nfor x in ans:\n    print(x)", "passed": true, "time": 0.14, "memory": 14116.0, "status": "done"}, {"code": "t = int(input())\nanswer = []\n\nfor i in range (t):\n    a, b, n, s = list(map(int,input().split()))\n    ans = \"NO\"\n    if a * n + b >= s:\n        s %= n\n        if s <= b:\n            ans = \"YES\"\n    answer.append(ans)\nfor i in range (t):\n    print (answer[i])", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "q = int(input())\n\nfor __ in [0]*q:\n    a,b,n,s = map(int,input().split())\n    xx = min(s//n,a)\n    s -= xx*n\n    if s <= b:\n        print('YES')\n    else:\n        print('NO')", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "t = int(input())\nfor _ in range(t):\n\n    a,b,n,s = list(map(int, input().split()))\n    coins = min(s//n,a)\n    s = s - coins*n\n    if(s<=b):\n        print(\"YES\")\n    else:\n        print(\"NO\")\n", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "import sys\n\ndef minp():\n\treturn sys.stdin.readline().strip()\n\ndef mint():\n\treturn int(minp())\n\ndef mints():\n\treturn list(map(int,minp().split()))\n\ndef solve():\n\ta,b,n,S = mints()\n\td = S // n\n\tr = S % n\n\td = min(a, d)\n\tprint([\"NO\",\"YES\"][S - d * n <= b])\n\n\nfor i in range(mint()):\n\tsolve()\n", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "q = int(input())\nfor query in range(q):\n    a,b,n,s = map(int, input().split(\" \"))\n    if(s >= n*a):\n       s = s - n*a\n    else:\n        s = s - ((s // n) * n)\n    if s > b:\n        print(\"NO\")\n    else:\n        print(\"YES\")", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "q=int(input())\nfor i in range(q):\n    a,b,c,d=map(int,input().split())\n    if a*c>d:\n        d%=c\n    else:\n        d-=a*c\n    print('YES' if d<=b else 'NO')", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}]