report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Combine rectangles - MarisaOJ: Marisa Online Judge

Combine rectangles

Time limit: 1000 ms
Memory limit: 256 MB
Given two rectangles with dimensions $a \times b$ and $c \times d$, determine whether it is possible to combine these two rectangles into a different rectangle by placing them side by side. ### Input - A single line containing four integers $a, b, c, d$. ### Output - Print YES if it's possible to combine them by placing them side by side, otherwise print NO. ### Constraints - $1 \le a, b, c, d \le 1000$. ### Sample test ``` 1 2 3 4 ``` Output: ``` NO ```
Input / Output and Condition
Hello Marisa!
A + B
A / B
Complex multiplication
Mushroom Classification
Integer equation
Age
Combine rectangles
String
Triangle
Rounded division
Circle
Calculator
The smallest and biggest
Rectangle
Segment
Distance
Ascending
Square number
Square numbers counting
Uppercase and lowercase
Letter Counting
Time format
Electricity bill
Eating mushroom
Topic
Basic
Rating 800
Solution (1) Solution