N, W = map(int, input().split()) segments = [] for i in range(N): L, R = map(int, input().split()) segments.append([R, L, i]) segments.append([W - 1 - L, W - 1 - R, i]) segments.sort() x = -1 used = [0] * N for R, L, i in segments: if not used[i] and L > x: used[i] = 1 x = R print("YES" if used.count(0) == 0 else "NO")