N,A,B,C,D = map(int,input().split())
S = input()
A_start = True
if C < D:
  space1 = S[A-1:D]
  if ('##' in space1) != True:
    print('Yes')
  else:
    print('No')
else:
  space1 = S[A-1:C]
  space2 = S[B-2:D+1]
  if ('##' in space1) != True and ('...' in space2) == True:
    print('Yes')
  else:
    print('No') N,A,B,C,D = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split A B C D S = input() S input() input A_start = True A_start True if C < D:
  space1 = S[A-1:D]
  if ('##' in space1) != True:
    print('Yes')
  else:
    print('No')
else:
  space1 = S[A-1:C]
  space2 = S[B-2:D+1]
  if ('##' in space1) != True and ('...' in space2) == True:
    print('Yes')
  else:
    print('No') C < D C D space1 = S[A-1:D] space1 S[A-1:D] S A-1:D A-1 A 1 D if ('##' in space1) != True:
    print('Yes')
  else:
    print('No') ('##' in space1) != True '##' in space1 '##' space1 True print('Yes') print 'Yes' print('No') print 'No' space1 = S[A-1:C] space1 S[A-1:C] S A-1:C A-1 A 1 C space2 = S[B-2:D+1] space2 S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 if ('##' in space1) != True and ('...' in space2) == True:
    print('Yes')
  else:
    print('No') ('##' in space1) != True and ('...' in space2) == True ('##' in space1) != True '##' in space1 '##' space1 True ('...' in space2) == True '...' in space2 '...' space2 True print('Yes') print 'Yes' print('No') print 'No' B,C,D = map(int,input().split()) map(int,input().split()) B D = map(int,input().split()) map(int,input().split()) D space1 = S[A-1:D] S[A-1:D] space1 S = input() input() S A,B,C,D = map(int,input().split()) map(int,input().split()) A C,D = map(int,input().split()) map(int,input().split()) C A_start = True True A_start space2 = S[B-2:D+1] S[B-2:D+1] space2 N,A,B,C,D = map(int,input().split()) map(int,input().split()) N space1 = S[A-1:C] S[A-1:C] space1
N,A,B,C,D = map(int,input().split())
S = input()
A_start = True
if C < D:
  space1 = S[A-1:D]
  if ('##' in space1) != True:
    print('Yes')
  else:
    print('No')
else:
  space1 = S[A-1:C]
  space2 = S[B-2:D+1]
  if ('##' in space1) != True and ('...' in space2) == True:
    print('Yes')
  else:
    print('No')
