Given an array **A** of **N** positive integers and another number **X**. Determine whether or not there exist two elements in A whose sum is exactly X.

**Input:**

The first line of input contains an integer **T** denoting the number of test cases. The first line of each test case is N and X, N is the size of array. The second line of each test case contains N integers representing array elements A[i].

**Output:**

Print "**Yes**" if there exist two elements in A whose sum is exactly X, else "**No**" (without quotes).

**Constraints:**

1 ≤ T ≤ 100

1 ≤ N ≤ 10^{5}

1 ≤ A[i] ≤ 10^{5}

**Example:
Input:**

2

6 16

1 4 45 6 10 8

5 10

1 2 4 3 6

**Output:**

Yes

Yes

**Explanation:
Testcases 1:** 10 and 6 are numbers making a pair whose sum is equal to 16.

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

the_coder95 | 465 |

thanuvinu94 | 388 |

adityasuman2025 | 348 |

Senbonzakura_Kageyoshi | 321 |

PrakharBansal1 | 294 |

the_coder95 | 1691 |

RishabhTanwar1 | 1110 |

thanuvinu94 | 1064 |

samay_kam_hai | 726 |

adityasuman2025 | 646 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4897 |

Quandray | 4547 |

Login to report an issue on this page.