N, X = map(int, input().split())
A, B = zip(*(map(int, input().split()) for _ in range(N)))

dp = [[False for _ in range(X + 1)] for _ in range(N + 1)]

dp[0][0] = True
for i in range(N):
    j = 0
    a, b = A[i], B[i]
    for j in range(X + 1):
        if dp[i][j]:
            a, b = A[i], B[i]
            k = j
            dp[i + 1][k] = True
            while b and k + a <= X:
                dp[i + 1][k + a] = True
                k += a
                b -= 1

print("Yes" if dp[N][X] else "No")
