P27586 [洛谷] [Language Monthly Contest 202211] Fear
普及-
题目描述

Problem Description

In a parallel universe's version of Identity V, there is a hidden value called Fear Level.

This value exists on the Survivors and changes as the Hunter chases the Survivors over time.

Specifically, before the Survivor is chased by the Hunter, the Survivor's initial value is $y_0$. The Survivor is chased by the Hunter for $t$ seconds.

At the first second, the Survivor's Fear Level is the initial value $y_0$. For each subsequent second, the Fear Level is multiplied by the initial value.

Particularly, if $t$ is $0$, then the Survivor's Fear Level is $1$.

If you are unsure about the calculation method of the Fear Level, refer to Sample Explanation #1 for clarification.

You need to calculate the parity and sign of the Survivor's Fear Level after being chased for $t$ seconds.

Input Format

The input consists of two integers on a single line, separated by a space.

The first integer is $y_0$, representing the initial value.

The second integer is $t$, representing the chase duration.

Output Format

Output two lines, each containing a string, either NO or YES.

The first line, if the Fear Level is negative, output YES; otherwise, output NO.

The second line, if the Fear Level is odd, output YES; otherwise, output NO.

Sample Input and Output

Sample Input #1

3 3

Sample Output #1

NO
YES

Sample Input #2

-2 1

Sample Output #2

YES
NO

Sample Input #3

0 1

Sample Output #3

NO
NO

Notes

[Sample #1 Explanation]

The Survivor's Fear Level corresponding to the chase seconds is as follows:

Seconds Fear Level
1 3
2 9
3 27

After 3 seconds of chase, the Survivor's Fear Level is 27, which is positive and odd.

[Sample #2 Explanation]

After 1 second of chase, the Survivor's Fear Level is -2, which is negative and even.

[Sample #3 Explanation]

Note that 0 is even.

[Data Range and Constraints]

For the first 10% of the data, $1 \leq y_0 \leq 100$, $t = 1$.
For the first 20% of the data, $1 \leq y_0 \leq 100$, $1 \leq t \leq 3$.
For the first 50% of the data, $0 \leq y_0 \leq 10^9$, $0 \leq t \leq 10^3$.
For the first 80% of the data, $-10^9 \leq y_0 \leq 10^9$, $0 \leq t \leq 10^9$.
For 100% of the data, $-10^{18} \leq y_0 \leq 10^{18}$, $0 \leq t \leq 10^{18}$.

The data guarantees that $y_0$ and $t$ are not both 0.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 3
样例输出
NO YES