from typing import Sequence
import math


def solve(N: int, W: int, a: Sequence[int], m: Sequence[int]) -> bool:
    dp = [[math.inf for _ in range(W + 1)] for _ in range(N + 1)]
    dp[0][0] = 0
    for i in range(N):
        for j in range(W + 1):
            dp[i + 1][j] = min(dp[i + 1][j], dp[i][j])
            if j - a[i] > 0 and dp[i + 1][j - a[i]] > m[i]:
                dp[i + 1][j] = dp[i + 1][j] or (dp[i + 1][j - a[i]] + 1)
    return dp[N][W] < math.inf


n, w = map(int, input().split())
a = list(map(int, input().split()))
m = list(map(int, input().split()))
print("Yes" if solve(n, w, a, m) else "No")
