PROBLEM 34
Easy

Temperature — Are Different

Go Programming Basics · Go

</>
STATUS Not solved

TASK

Problem

#34

Two integers `a` and `b` are entered. Determine the requested relation for “Are Different” and print the result.

EXAMPLE

Example

Input
5 9
Output
YES

LIMITS

Constraints

- Unless the statement says otherwise, integer inputs have absolute value at most 1,000,000.
- Every divisor used in the task is non-zero.
- Floating-point test values are chosen so the required arithmetic fits `float64`.
📖
LEARN Theory for this problem
+

`if` selects a branch from a boolean condition. Combine predicates with `&&`, `||`, and `!` only when their precedence matches the intended logic.

`fmt.Scan`/`fmt.Fscan` parses whitespace-separated input into typed variables. The variable type controls how later arithmetic and comparisons behave.

Apply these rules directly to the task requirement: two integers `a` and `b` are entered. Determine the requested relation for “Are Different” and print the result.

💡
NEED HELP? Hints
+

['Write the boolean condition directly, then verify boundary values just below, at, and just above each threshold.', 'Read values in exactly the order stated by the condition.', 'Use the sample input `5 9` to verify parsing and confirm that the program prints exactly `YES` with no extra text.']

ANSWER Solution
+
package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)
	if a != b {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}