#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
	int n,a,b,c,d,ans;
	scanf("%d %d %d %d %d",&n, &a, &b, &c, &d);
	char s[n];
	scanf("%s", &s);
	a--;
	b--;
	c--;
	d--;
	ans=0;
	
	s[a]='a';
	s[b]='b';
//	printf("%s\n", s);
	if(c>d){	//a go first
		while(1){
		if(s[c]=='a'){
			if(s[d]=='b'){
				ans=1;
				break;
			}else{
				if(s[b+1]=='.'){
					s[b]='.';
					b++;
					s[b]='b';
				}else{
					if(s[b+2]=='.'){
						s[b]='.';
						b+=2;
						s[b]='b';
					}else{
						ans=0;
						break;
					}
				}
			}
		}else{
			if(s[a+1]=='.'){
				s[a]='.';
				a++;
				s[a]='a';
			}else{
				if(s[a+2]=='.'){
					s[a]='.';
					a+=2;
					s[a]='a';
				}else{
					if(s[d]=='b'){
						ans=0;
						break;
					}else{
						if(s[b+1]=='.'){
							s[b]='.';
							b++;
							s[b]='b';
						}else{
							if(s[b+2]=='.'){
								s[b]='.';
								b+=2;
								s[b]='b';
							}else{
								ans=0;
								break;
							}
						}
					}
				}
			}
		}
//		printf("%s\n", s);
		}
	}else{
		while(1){
		if(s[d]=='b'){
			if(s[c]=='a'){
				ans=1;
				break;
			}else{
				if(s[a+1]=='.'){
					s[a]='.';
					a++;
					s[a]='a';
				}else{
					if(s[a+2]=='.'){
						s[a]='.';
						a+=2;
						s[a]='a';
					}else{
						ans=0;
						break;
					}
				}
			}
		}else{
			if(s[b+1]=='.'){
				s[b]='.';
				b++;
				s[b]='b';
			}else{
				if(s[b+2]=='.'){
					s[b]='.';
					b+=2;
					s[b]='b';
				}else{
					if(s[c]=='a'){
						ans=0;
						break;
					}else{
						if(s[a+1]=='.'){
							s[a]='.';
							a++;
							s[a]='a';
						}else{
							if(s[a+2]=='.'){
								s[a]='.';
								a+=2;
								s[a]='a';
							}else{
								ans=0;
								break;
							}
						}
					}
				}
			}
		}
//		printf("%s\n", s);
		}
	}
	if(ans==1)
		printf("Yes");
	else
		printf("No");
	return 0;
}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_275/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_275/source.m"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@.str = private unnamed_addr constant [15 x i8] c"%d %d %d %d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
  %n = alloca i32, align 4
  %a = alloca i32, align 4
  %b = alloca i32, align 4
  %c = alloca i32, align 4
  %d = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #4
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d)
  %0 = load i32, ptr %n, align 4, !tbaa !5
  %1 = zext i32 %0 to i64
  %2 = call ptr @llvm.stacksave.p0()
  %vla = alloca i8, i64 %1, align 16
  %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla)
  %3 = load i32, ptr %a, align 4, !tbaa !5
  %dec = add nsw i32 %3, -1
  store i32 %dec, ptr %a, align 4, !tbaa !5
  %4 = load i32, ptr %b, align 4, !tbaa !5
  %dec2 = add nsw i32 %4, -1
  store i32 %dec2, ptr %b, align 4, !tbaa !5
  %5 = load i32, ptr %c, align 4, !tbaa !5
  %dec3 = add nsw i32 %5, -1
  store i32 %dec3, ptr %c, align 4, !tbaa !5
  %6 = load i32, ptr %d, align 4, !tbaa !5
  %dec4 = add nsw i32 %6, -1
  store i32 %dec4, ptr %d, align 4, !tbaa !5
  %idxprom = sext i32 %dec to i64
  %arrayidx = getelementptr inbounds i8, ptr %vla, i64 %idxprom
  store i8 97, ptr %arrayidx, align 1, !tbaa !9
  %idxprom5 = sext i32 %dec2 to i64
  %arrayidx6 = getelementptr inbounds i8, ptr %vla, i64 %idxprom5
  store i8 98, ptr %arrayidx6, align 1, !tbaa !9
  %cmp = icmp sgt i32 %5, %6
  br i1 %cmp, label %while.cond.preheader, label %while.cond111.preheader

while.cond111.preheader:                          ; preds = %entry
  %idxprom113 = sext i32 %dec4 to i64
  %arrayidx114 = getelementptr inbounds i8, ptr %vla, i64 %idxprom113
  %idxprom182 = sext i32 %dec3 to i64
  %arrayidx183 = getelementptr inbounds i8, ptr %vla, i64 %idxprom182
  br label %while.cond111.outer

while.cond.preheader:                             ; preds = %entry
  %idxprom7 = sext i32 %dec3 to i64
  %arrayidx8 = getelementptr inbounds i8, ptr %vla, i64 %idxprom7
  %idxprom71 = sext i32 %dec4 to i64
  %arrayidx72 = getelementptr inbounds i8, ptr %vla, i64 %idxprom71
  br label %while.cond.outer

while.cond.outer:                                 ; preds = %while.cond.outer.backedge, %while.cond.preheader
  %add91241.ph = phi i32 [ %dec2, %while.cond.preheader ], [ %add91241.ph.be, %while.cond.outer.backedge ]
  %add58238.ph = phi i32 [ %dec, %while.cond.preheader ], [ %add58238, %while.cond.outer.backedge ]
  br label %while.cond

while.cond:                                       ; preds = %while.cond.backedge, %while.cond.outer
  %add58238 = phi i32 [ %add58238.ph, %while.cond.outer ], [ %add58238.be, %while.cond.backedge ]
  %7 = load i8, ptr %arrayidx8, align 1, !tbaa !9
  %cmp9 = icmp eq i8 %7, 97
  br i1 %cmp9, label %if.then11, label %if.else44

if.then11:                                        ; preds = %while.cond
  %8 = load i8, ptr %arrayidx72, align 1, !tbaa !9
  %cmp15 = icmp eq i8 %8, 98
  br i1 %cmp15, label %if.end229, label %if.else

if.else:                                          ; preds = %if.then11
  %add = add nsw i32 %add91241.ph, 1
  %idxprom18 = sext i32 %add to i64
  %arrayidx19 = getelementptr inbounds i8, ptr %vla, i64 %idxprom18
  %9 = load i8, ptr %arrayidx19, align 1, !tbaa !9
  %cmp21 = icmp eq i8 %9, 46
  br i1 %cmp21, label %if.then23, label %if.else28

if.then23:                                        ; preds = %if.else
  %idxprom24 = sext i32 %add91241.ph to i64
  %arrayidx25 = getelementptr inbounds i8, ptr %vla, i64 %idxprom24
  store i8 46, ptr %arrayidx25, align 1, !tbaa !9
  store i32 %add, ptr %b, align 4, !tbaa !5
  store i8 98, ptr %arrayidx19, align 1, !tbaa !9
  br label %while.cond.outer.backedge

if.else28:                                        ; preds = %if.else
  %add29 = add nsw i32 %add91241.ph, 2
  %idxprom30 = sext i32 %add29 to i64
  %arrayidx31 = getelementptr inbounds i8, ptr %vla, i64 %idxprom30
  %10 = load i8, ptr %arrayidx31, align 1, !tbaa !9
  %cmp33 = icmp eq i8 %10, 46
  br i1 %cmp33, label %if.then35, label %if.end229

if.then35:                                        ; preds = %if.else28
  %idxprom36 = sext i32 %add91241.ph to i64
  %arrayidx37 = getelementptr inbounds i8, ptr %vla, i64 %idxprom36
  store i8 46, ptr %arrayidx37, align 1, !tbaa !9
  store i32 %add29, ptr %b, align 4, !tbaa !5
  store i8 98, ptr %arrayidx31, align 1, !tbaa !9
  br label %while.cond.outer.backedge

if.else44:                                        ; preds = %while.cond
  %add45 = add nsw i32 %add58238, 1
  %idxprom46 = sext i32 %add45 to i64
  %arrayidx47 = getelementptr inbounds i8, ptr %vla, i64 %idxprom46
  %11 = load i8, ptr %arrayidx47, align 1, !tbaa !9
  %cmp49 = icmp eq i8 %11, 46
  br i1 %cmp49, label %if.then51, label %if.else57

if.then51:                                        ; preds = %if.else44
  %idxprom52 = sext i32 %add58238 to i64
  %arrayidx53 = getelementptr inbounds i8, ptr %vla, i64 %idxprom52
  store i8 46, ptr %arrayidx53, align 1, !tbaa !9
  store i32 %add45, ptr %a, align 4, !tbaa !5
  store i8 97, ptr %arrayidx47, align 1, !tbaa !9
  br label %while.cond.backedge

while.cond.backedge:                              ; preds = %if.then51, %if.then64
  %add58238.be = phi i32 [ %add45, %if.then51 ], [ %add58, %if.then64 ]
  br label %while.cond

if.else57:                                        ; preds = %if.else44
  %add58 = add nsw i32 %add58238, 2
  %idxprom59 = sext i32 %add58 to i64
  %arrayidx60 = getelementptr inbounds i8, ptr %vla, i64 %idxprom59
  %12 = load i8, ptr %arrayidx60, align 1, !tbaa !9
  %cmp62 = icmp eq i8 %12, 46
  br i1 %cmp62, label %if.then64, label %if.else70

if.then64:                                        ; preds = %if.else57
  %idxprom65 = sext i32 %add58238 to i64
  %arrayidx66 = getelementptr inbounds i8, ptr %vla, i64 %idxprom65
  store i8 46, ptr %arrayidx66, align 1, !tbaa !9
  store i32 %add58, ptr %a, align 4, !tbaa !5
  store i8 97, ptr %arrayidx60, align 1, !tbaa !9
  br label %while.cond.backedge

if.else70:                                        ; preds = %if.else57
  %13 = load i8, ptr %arrayidx72, align 1, !tbaa !9
  %cmp74 = icmp eq i8 %13, 98
  br i1 %cmp74, label %if.end229, label %if.else77

if.else77:                                        ; preds = %if.else70
  %add78 = add nsw i32 %add91241.ph, 1
  %idxprom79 = sext i32 %add78 to i64
  %arrayidx80 = getelementptr inbounds i8, ptr %vla, i64 %idxprom79
  %14 = load i8, ptr %arrayidx80, align 1, !tbaa !9
  %cmp82 = icmp eq i8 %14, 46
  br i1 %cmp82, label %if.then84, label %if.else90

if.then84:                                        ; preds = %if.else77
  %idxprom85 = sext i32 %add91241.ph to i64
  %arrayidx86 = getelementptr inbounds i8, ptr %vla, i64 %idxprom85
  store i8 46, ptr %arrayidx86, align 1, !tbaa !9
  store i32 %add78, ptr %b, align 4, !tbaa !5
  store i8 98, ptr %arrayidx80, align 1, !tbaa !9
  br label %while.cond.outer.backedge

if.else90:                                        ; preds = %if.else77
  %add91 = add nsw i32 %add91241.ph, 2
  %idxprom92 = sext i32 %add91 to i64
  %arrayidx93 = getelementptr inbounds i8, ptr %vla, i64 %idxprom92
  %15 = load i8, ptr %arrayidx93, align 1, !tbaa !9
  %cmp95 = icmp eq i8 %15, 46
  br i1 %cmp95, label %if.then97, label %if.end229

if.then97:                                        ; preds = %if.else90
  %idxprom98 = sext i32 %add91241.ph to i64
  %arrayidx99 = getelementptr inbounds i8, ptr %vla, i64 %idxprom98
  store i8 46, ptr %arrayidx99, align 1, !tbaa !9
  store i32 %add91, ptr %b, align 4, !tbaa !5
  store i8 98, ptr %arrayidx93, align 1, !tbaa !9
  br label %while.cond.outer.backedge

while.cond.outer.backedge:                        ; preds = %if.then97, %if.then84, %if.then35, %if.then23
  %add91241.ph.be = phi i32 [ %add, %if.then23 ], [ %add29, %if.then35 ], [ %add78, %if.then84 ], [ %add91, %if.then97 ]
  br label %while.cond.outer

while.cond111:                                    ; preds = %while.cond111.backedge, %while.cond111.outer
  %add169233 = phi i32 [ %add169233.ph, %while.cond111.outer ], [ %add169233.be, %while.cond111.backedge ]
  %16 = load i8, ptr %arrayidx114, align 1, !tbaa !9
  %cmp116 = icmp eq i8 %16, 98
  br i1 %cmp116, label %if.then118, label %if.else155

if.then118:                                       ; preds = %while.cond111
  %17 = load i8, ptr %arrayidx183, align 1, !tbaa !9
  %cmp122 = icmp eq i8 %17, 97
  br i1 %cmp122, label %if.end229, label %if.else125

if.else125:                                       ; preds = %if.then118
  %add126 = add nsw i32 %add202235.ph, 1
  %idxprom127 = sext i32 %add126 to i64
  %arrayidx128 = getelementptr inbounds i8, ptr %vla, i64 %idxprom127
  %18 = load i8, ptr %arrayidx128, align 1, !tbaa !9
  %cmp130 = icmp eq i8 %18, 46
  br i1 %cmp130, label %if.then132, label %if.else138

if.then132:                                       ; preds = %if.else125
  %idxprom133 = sext i32 %add202235.ph to i64
  %arrayidx134 = getelementptr inbounds i8, ptr %vla, i64 %idxprom133
  store i8 46, ptr %arrayidx134, align 1, !tbaa !9
  store i32 %add126, ptr %a, align 4, !tbaa !5
  store i8 97, ptr %arrayidx128, align 1, !tbaa !9
  br label %while.cond111.outer.backedge

if.else138:                                       ; preds = %if.else125
  %add139 = add nsw i32 %add202235.ph, 2
  %idxprom140 = sext i32 %add139 to i64
  %arrayidx141 = getelementptr inbounds i8, ptr %vla, i64 %idxprom140
  %19 = load i8, ptr %arrayidx141, align 1, !tbaa !9
  %cmp143 = icmp eq i8 %19, 46
  br i1 %cmp143, label %if.then145, label %if.end229

if.then145:                                       ; preds = %if.else138
  %idxprom146 = sext i32 %add202235.ph to i64
  %arrayidx147 = getelementptr inbounds i8, ptr %vla, i64 %idxprom146
  store i8 46, ptr %arrayidx147, align 1, !tbaa !9
  store i32 %add139, ptr %a, align 4, !tbaa !5
  store i8 97, ptr %arrayidx141, align 1, !tbaa !9
  br label %while.cond111.outer.backedge

if.else155:                                       ; preds = %while.cond111
  %add156 = add nsw i32 %add169233, 1
  %idxprom157 = sext i32 %add156 to i64
  %arrayidx158 = getelementptr inbounds i8, ptr %vla, i64 %idxprom157
  %20 = load i8, ptr %arrayidx158, align 1, !tbaa !9
  %cmp160 = icmp eq i8 %20, 46
  br i1 %cmp160, label %if.then162, label %if.else168

if.then162:                                       ; preds = %if.else155
  %idxprom163 = sext i32 %add169233 to i64
  %arrayidx164 = getelementptr inbounds i8, ptr %vla, i64 %idxprom163
  store i8 46, ptr %arrayidx164, align 1, !tbaa !9
  store i32 %add156, ptr %b, align 4, !tbaa !5
  store i8 98, ptr %arrayidx158, align 1, !tbaa !9
  br label %while.cond111.backedge

while.cond111.backedge:                           ; preds = %if.then162, %if.then175
  %add169233.be = phi i32 [ %add156, %if.then162 ], [ %add169, %if.then175 ]
  br label %while.cond111

if.else168:                                       ; preds = %if.else155
  %add169 = add nsw i32 %add169233, 2
  %idxprom170 = sext i32 %add169 to i64
  %arrayidx171 = getelementptr inbounds i8, ptr %vla, i64 %idxprom170
  %21 = load i8, ptr %arrayidx171, align 1, !tbaa !9
  %cmp173 = icmp eq i8 %21, 46
  br i1 %cmp173, label %if.then175, label %if.else181

if.then175:                                       ; preds = %if.else168
  %idxprom176 = sext i32 %add169233 to i64
  %arrayidx177 = getelementptr inbounds i8, ptr %vla, i64 %idxprom176
  store i8 46, ptr %arrayidx177, align 1, !tbaa !9
  store i32 %add169, ptr %b, align 4, !tbaa !5
  store i8 98, ptr %arrayidx171, align 1, !tbaa !9
  br label %while.cond111.backedge

if.else181:                                       ; preds = %if.else168
  %22 = load i8, ptr %arrayidx183, align 1, !tbaa !9
  %cmp185 = icmp eq i8 %22, 97
  br i1 %cmp185, label %if.end229, label %if.else188

if.else188:                                       ; preds = %if.else181
  %add189 = add nsw i32 %add202235.ph, 1
  %idxprom190 = sext i32 %add189 to i64
  %arrayidx191 = getelementptr inbounds i8, ptr %vla, i64 %idxprom190
  %23 = load i8, ptr %arrayidx191, align 1, !tbaa !9
  %cmp193 = icmp eq i8 %23, 46
  br i1 %cmp193, label %if.then195, label %if.else201

if.then195:                                       ; preds = %if.else188
  %idxprom196 = sext i32 %add202235.ph to i64
  %arrayidx197 = getelementptr inbounds i8, ptr %vla, i64 %idxprom196
  store i8 46, ptr %arrayidx197, align 1, !tbaa !9
  store i32 %add189, ptr %a, align 4, !tbaa !5
  store i8 97, ptr %arrayidx191, align 1, !tbaa !9
  br label %while.cond111.outer.backedge

while.cond111.outer:                              ; preds = %while.cond111.outer.backedge, %while.cond111.preheader
  %add202235.ph = phi i32 [ %dec, %while.cond111.preheader ], [ %add202235.ph.be, %while.cond111.outer.backedge ]
  %add169233.ph = phi i32 [ %dec2, %while.cond111.preheader ], [ %add169233, %while.cond111.outer.backedge ]
  br label %while.cond111

if.else201:                                       ; preds = %if.else188
  %add202 = add nsw i32 %add202235.ph, 2
  %idxprom203 = sext i32 %add202 to i64
  %arrayidx204 = getelementptr inbounds i8, ptr %vla, i64 %idxprom203
  %24 = load i8, ptr %arrayidx204, align 1, !tbaa !9
  %cmp206 = icmp eq i8 %24, 46
  br i1 %cmp206, label %if.then208, label %if.end229

if.then208:                                       ; preds = %if.else201
  %idxprom209 = sext i32 %add202235.ph to i64
  %arrayidx210 = getelementptr inbounds i8, ptr %vla, i64 %idxprom209
  store i8 46, ptr %arrayidx210, align 1, !tbaa !9
  store i32 %add202, ptr %a, align 4, !tbaa !5
  store i8 97, ptr %arrayidx204, align 1, !tbaa !9
  br label %while.cond111.outer.backedge

while.cond111.outer.backedge:                     ; preds = %if.then208, %if.then195, %if.then145, %if.then132
  %add202235.ph.be = phi i32 [ %add126, %if.then132 ], [ %add139, %if.then145 ], [ %add189, %if.then195 ], [ %add202, %if.then208 ]
  br label %while.cond111.outer

if.end229:                                        ; preds = %if.else201, %if.else181, %if.else138, %if.then118, %if.else90, %if.else70, %if.else28, %if.then11
  %.str.3.sink = phi ptr [ @.str.2, %if.then11 ], [ @.str.3, %if.else28 ], [ @.str.3, %if.else70 ], [ @.str.3, %if.else90 ], [ @.str.2, %if.then118 ], [ @.str.3, %if.else138 ], [ @.str.3, %if.else181 ], [ @.str.3, %if.else201 ]
  %call228 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  call void @llvm.stackrestore.p0(ptr %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nounwind }

!llvm.linker.options = !{}
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
