## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

# [Solution] Journey of the Knight CodeChef Solution 2022

Chef has an $8×8$ chessboard. He placed a knight on the square $\left({X}_{1},{Y}_{1}\right)$. Note that, the square at the intersection of the ${i}^{th}$ row and ${j}^{th}$ column is denoted by $\left(i,j\right)$.

Chef wants to determine whether the knight can end up at the square $\left({X}_{2},{Y}_{2}\right)$ in exactly $100$ moves or not.

For reference, a knight can move to a square which is:

• One square horizontally and two squares vertically away from the current square, or
• One square vertically and two squares horizontally away from the current square
Solution Click Below:-  👉
👇👇👇👇👇

A visual description of this may be found here.

### Input Format

• The first line contains a single integer $T$ — the number of test cases. Then the test cases follow.
• The first and only line of each test case contains $4$ integers ${X}_{1},{Y}_{1},{X}_{2},{Y}_{2}$ — where $\left({X}_{1},{Y}_{1}\right)$ denotes the starting square of the knight and $\left({X}_{2},{Y}_{2}\right)$ denotes the ending square of the knight.

### Output Format

For each test case, output YES if knight can move from $\left({X}_{1},{Y}_{1}\right)$ to $\left({X}_{2},{Y}_{2}\right)$ in exactly $100$ moves. Otherwise, output NO.

Bidding CodeChef Solution

Pass the Exam CodeChef Solution

Chef and Candies CodeChef Solution

Journey of the Knight CodeChef Solution

Slow Solution CodeChef Solution

Game of Piles Version 1 CodeChef Solution

Find A, B, C CodeChef Solution

Largest Square in the garden CodeChef Solution

Game of Piles Version 2 CodeChef Solution

You may print each character of YES and NO in uppercase or lowercase (for example, yesyEsYes will be considered identical).

### Constraints

• $1\le T\le 1000$