## Editorial for DMOPC '15 Contest 3 P1 - Quality Scenes

Remember to use this editorial

**only**when stuck, and**not to copy-paste code from it**. Please be respectful to the problem author and editorialist.**Submitting an official solution before solving the problem yourself is a bannable offence.**Author:

**Knowledge required:** simple logic

This problem asks whether two given video clips overlap. In other words, it cares if for any constant .

```
solve :: [Integer] -> String
solve [a,b,c,d] | a > c = solve [c,d,a,b]
solve [a,b,c,d] | b > c = "YES"
solve [a,b,c,d] = "NO"
main = interact $ solve . (map read) . lines
```

Time Complexity:

**Bonus:** How would you solve this problem if there were video clips?

## Comments

That is Haskell.

What language is this?