Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
for i in range(n):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")


Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))

v = sorted(p)
cou=0
for i in range(n):
    if p[i] != v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))

v = sorted(p)
cou=0
for i in range(n):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print("YES")
else:
    print("NO")

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
for i in range(n):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print('YES')
else:
    print('NO')


Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
for i in range(len(p)):
    if not p[i] == v[i]:
        cou+=1

if cou <= 2:
    print('YES')
else:
    print('NO')

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            cou+=1

if cou <= 2:
    print('YES')
else:
    print('NO')



Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = list(map(int, input().split()))
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
n = int(input)
p = map(int, input().split())
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            print i
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
p = map(int, '1 2 3 4 5 6 7'.split())
v = sorted(p)
cou=0
if p==v:
    cou =2
else:
    for i in range(len(p)):
        if not p[i] == v[i]:
            print i
            cou+=1

if cou == 2:
    print('YES')
else:
    print('NO')

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
 
q = sorted(p)
cou = 0
for i in range(n):
    if p[i] != q[i]:
        cou += 1
 
if cou <= 2:
    print("YES")
else:
    print("NO")