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

Segment

Time limit: 1000 ms
Memory limit: 256 MB
Given two line segments, $AB$ and $CD$, lying on the number line. Line segment $AB$ extends from point $a$ to point $b$, and line segment $CD$ extends from point $c$ to point $d$. Check if the two line segments have a common point. ### Input - A single line containing four integers $a, b, c, d$. ### Output - If the two line segments have a common point, print YES. Otherwise, print NO. ### Constraints - $1 \le a \le b \le 1000$ - $1 \le c \le d \le 1000$ ### Sample test ``` 1 2 2 3 ``` Output: ``` YES ```
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
Introduction
Rating 800
Solution (1) Solution