n = int(input()) rx, gx, bx = map(int, input().split()) r = [0] * n g = [0] * n b = [0] * n t = [0] * n mp = {} for i in range(n): r[i], g[i], b[i], t[i] = map(int, input().split()) key = (t[i] * r[i], t[i] * g[i], t[i] * b[i]) if key not in mp: mp[key] = [] mp[key].append(i) if t[i] == 100: if r[i] == rx and g[i] == gx and b[i] == bx: print("Yes") exit() for i in range(n): if t[i] != 100: rtmp = 10000 * rx - 100 * t[i] * r[i] if rtmp % (100 - t[i]) != 0: continue rtmp //= 100 - t[i] gtmp = 10000 * gx - 100 * t[i] * g[i] if gtmp % (100 - t[i]) != 0: continue gtmp //= 100 - t[i] btmp = 10000 * bx - 100 * t[i] * b[i] if btmp % (100 - t[i]) != 0: continue btmp //= 100 - t[i] key = (rtmp, gtmp, btmp) now = mp.get(key, []) for j in range(min(2, len(now))): if now[j] == i: continue print("Yes") exit() print("No")