Skip to main content
Back to problems
Codeforces
Easy
Math
Bit Manipulation
The Artful Expedient

Determine whether two numbers can be made equal under a simple bitwise condition.

Acceptance 0%
Also Available On
Other platform versions and source mappings for the same problem.
Problem Statement

Problem

You are given two integers. Check whether they satisfy the condition required by the problem statement on Codeforces 869A and decide if the answer is possible.

This is a short implementation-style problem focused on inspecting the binary representation of the numbers and applying the stated rule exactly.

Goal

Output YES if the condition holds, otherwise output NO.

Input Format

  • The first line contains two integers.
  • Both integers fit within the usual 32-bit signed integer range.

Output Format

  • Print YES if the condition is satisfied.
  • Otherwise, print NO.

Constraints

  • Input size is tiny.
  • The intended solution is constant time.
  • Use the exact rule from the statement when deciding the answer.
Examples
Sample cases returned by the problem API.

Example 1

Input

1 2

Output

YES

Explanation

This illustrates the kind of binary-condition check the task asks for. The answer depends on whether the rule is satisfied for the two given numbers.

Premium problem context

Unlock deeper context for this problem

Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.

Guided hints
Editorial and discussion links
Concept map and variants
Sign in to unlock
Track your progress
Sign in to bookmark this problem, save notes, and manage its revision plan.