def isSorted(arr):
if len(arr)==1 or len(arr)==0:
return True
if arr[0]<arr[1] and isSorted(arr[1:]):
return True
return False
n=int(input())
arr=[int(i) for i in input().split()]
if isSorted(arr):
print('true')
else:
print('false')