Problem p03017 (python)

Fixed submission:
n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[b-2:d+1]:
        flg = True
if '##' in s[a-1:max(d,c)-1]:
    flg = False
if flg:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
    print(aaaaa)
else:#c>d
    if '...' in s[a-1:]:
        flg = True
        if not('...' in s[:d-1]):
            flg = False
        if (b>3):
            if '...' in s[:b]:
                flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
    print(nownw)
else:#c>d
    if '...' in s[a-1:]:
        flg = True
        if not('...' in s[:d-1]):
            flg = False
        if (b>3):
            if '...' in s[:b]:
                flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[a-1:]:
        flg = True
        if not('...' in s[:d-1]):
            flg = False
        elif (b>3):
            if '...' in s[:b]:
                flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print(aaaa)

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[a-1:]:
        flg = True
        if not('...' in s[:d-1]):
            flg = False
        else if (b>3):
            if '...' in s[:b]:
                flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
flg = False
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[a-1:]:
        flg = True
        if not('...' in s[:d-1]):
            flg = False
        else if ('...' in s[a-1:b]):
            flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[a-1:]:
        flg = True
        if not(c-d==2 and '...' in s[:d-1]):
            flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[a:]:
        flg = True
        if not(c-d==2 and '...' in s[:d]):
            flg = False
if '##' in s:
    flg = False
if flg:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,a,b,c,d = map(int,input().split())
s = input()
if '##' in s:
    flg = False
if c < d:
    #最後まで動かす
    flg = True
else:#c>d
    if '...' in s[a:]:
        flg = True
if flg:
    print('Yes')
else:
    print('No')