This page is still under construction.

Parts of this page are still being built. What you see may change.

Laptop Sticker

Interview

Time limit1sMemory limit1024 MB

Summary
Decide whether a sticker fits on a laptop lid with one centimeter of margin on every side, without rotating it.
Level

Easy2 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Your school has given you a laptop computer. However, they insist on putting a laptop sticker with their logo on your new computer. That sticker might be very large, and it cannot be rotated. Will it fit, with one centimeter to spare on all sides?

Input

The single line of input contains four integers w_cw\_c, h_ch\_c, w_sw\_s, and h_sh\_s (1≤w_c,h_c,w_s,h_s≤1,0001 \le w\_c, h\_c, w\_s, h\_s \le 1,000), where w_cw\_c is the width of your new laptop computer, h_ch\_c is the height of your new laptop computer, w_sw\_s is the width of the laptop sticker, and h_sh\_s is the height of the laptop sticker. All measurements are in centimeters.

Output

Output a single integer, which is 1 if the laptop sticker will fit on your new laptop computer, without rotating, but with one centimeter of space on all sides, and 0 if the laptop sticker will not fit.

Examples3

  1. Example 1

    Input
    30 30 27 27
    
    Expected output
    1
    
  2. Example 2

    Input
    35 30 25 29
    
    Expected output
    0
    
  3. Example 3

    Input
    30 35 30 35
    
    Expected output
    0