aboutsummaryrefslogtreecommitdiff
path: root/codechef/breakTheStick/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'codechef/breakTheStick/main.cpp')
-rw-r--r--codechef/breakTheStick/main.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/codechef/breakTheStick/main.cpp b/codechef/breakTheStick/main.cpp
new file mode 100644
index 0000000..bff76e2
--- /dev/null
+++ b/codechef/breakTheStick/main.cpp
@@ -0,0 +1,23 @@
+#include<bits/stdc++.h>
+
+using namespace std;
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while(tt--){
+ int n, x;
+ cin >> n >> x;
+ if(n & 1 && x & 1) {
+ cout << "YES" << endl;
+ } else if(n & 1 && !(x & 1)){
+ cout << "NO" << endl;
+ } else {
+ cout << "YES" << endl;
+ }
+ }
+}
+
+