process.stdin.resume();
process.stdin.setEncoding('utf-8');
let input_string = '';

process.stdin.on('data', (chunk) => {
    input_string += chunk;
});

process.stdin.on('end', () => {
    let lines = input_string.split('\n');

    const input = lines[0].split(' ').map(x => parseInt(x));
    console.log(input.every((x, i, arr) => arr.length <= (i+1) || x < arr[i+1]) ? 'Yes' : 'No');
});
