Control C102A P82374


Statement
 

pdf   zip

html

Write a program that, given five integers x,a,b,c,d, determines if x∈[a,b]∪[c,d].

Input

The input is five integers x,a,b,c,d.

Output

The output is a line with the text “yes” if x∈[a,b]∪[c,d] and the text “no” otherwise.

Public test cases
  • Input

    10 5 15 2 6
    

    Output

    yes
    
  • Input

    -3 -5 10 8 12
    

    Output

    yes
    
  • Input

    6 2 2 9 12
    

    Output

    no
    
  • Input

    6 6 12 18 30
    

    Output

    yes
    
  • Input

    6 12 3 4 5
    

    Output

    no
    
  • Information
    Author
    Professorat de P1
    Language
    English
    Translator
    Gabriel Valiente
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C C++ Java Python