#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(a) ((a) < 0 ? (-(a)) : (a))
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)

typedef long long Int;

int main() {
    Int n, a, b, c, d;
    scanf("%lld %lld %lld %lld %lld ", &n, &a, &b, &c, &d);
    bool *x = (bool *)malloc(sizeof(bool) * (n + 2));
    bool prev = false;
    Int current = 0;
    Int max = 0;
    reps(i, n) {
        x[i] = (getchar() == '.');
        if (i >= a && i <= MAX(c, d) && !prev && !x[i]) {
            puts("No");
            return 0;
        }
        if (i >= b && i <= MIN(c, d)) {
            if (x[i]) {
                current++;
                max = MAX(max, current);
            } else {
                current = 0;
            }
        }
        prev = x[i];
    }
	puts(c < d || max >= 3 || (x[b - 1] && x[b + 1]) || (x[d - 1] && x[d + 1]) ? "Yes" : "No");
}


; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_274/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_274/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 [26 x i8] c"%lld %lld %lld %lld %lld \00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"No\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@stdin = external local_unnamed_addr global ptr, align 8

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
  %n = alloca i64, align 8
  %a = alloca i64, align 8
  %b = alloca i64, align 8
  %c = alloca i64, align 8
  %d = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d) #5
  %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 i64, ptr %n, align 8, !tbaa !5
  %add = add nsw i64 %0, 2
  %call1 = call noalias ptr @malloc(i64 noundef %add) #6
  %conv = trunc i64 %0 to i32
  %cmp.not109 = icmp slt i32 %conv, 1
  br i1 %cmp.not109, label %for.end, label %for.body.preheader

for.body.preheader:                               ; preds = %entry
  %1 = add i64 %0, 1
  %wide.trip.count = and i64 %1, 4294967295
  br label %for.body

for.body:                                         ; preds = %for.body.preheader, %if.end45
  %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %if.end45 ]
  %max.0112 = phi i64 [ 0, %for.body.preheader ], [ %max.1, %if.end45 ]
  %current.0111 = phi i64 [ 0, %for.body.preheader ], [ %current.1, %if.end45 ]
  %prev.0110 = phi i1 [ false, %for.body.preheader ], [ %cmp4, %if.end45 ]
  %2 = load ptr, ptr @stdin, align 8, !tbaa !9
  %call.i = call i32 @getc(ptr noundef %2)
  %cmp4 = icmp eq i32 %call.i, 46
  %arrayidx = getelementptr inbounds i8, ptr %call1, i64 %indvars.iv
  %frombool = zext i1 %cmp4 to i8
  store i8 %frombool, ptr %arrayidx, align 1, !tbaa !11
  %3 = load i64, ptr %a, align 8, !tbaa !5
  %cmp7.not = icmp sgt i64 %3, %indvars.iv
  br i1 %cmp7.not, label %if.end, label %land.lhs.true

land.lhs.true:                                    ; preds = %for.body
  %4 = load i64, ptr %c, align 8
  %5 = load i64, ptr %d, align 8
  %cond = call i64 @llvm.smax.i64(i64 %4, i64 %5)
  %cmp12.not = icmp slt i64 %cond, %indvars.iv
  %brmerge = or i1 %prev.0110, %cmp12.not
  %brmerge106 = or i1 %cmp4, %brmerge
  br i1 %brmerge106, label %if.end, label %cleanup75

if.end:                                           ; preds = %land.lhs.true, %for.body
  %6 = load i64, ptr %b, align 8, !tbaa !5
  %cmp21.not = icmp sgt i64 %6, %indvars.iv
  br i1 %cmp21.not, label %if.end45, label %land.lhs.true23

land.lhs.true23:                                  ; preds = %if.end
  %7 = load i64, ptr %c, align 8
  %8 = load i64, ptr %d, align 8
  %cond30 = call i64 @llvm.smin.i64(i64 %7, i64 %8)
  %cmp31.not = icmp sge i64 %cond30, %indvars.iv
  %brmerge107.not = and i1 %cmp31.not, %cmp4
  %current.0.mux = select i1 %cmp31.not, i64 0, i64 %current.0111
  br i1 %brmerge107.not, label %if.then37, label %if.end45

if.then37:                                        ; preds = %land.lhs.true23
  %inc = add nsw i64 %current.0111, 1
  %cond43 = call i64 @llvm.smax.i64(i64 %max.0112, i64 %inc)
  br label %if.end45

if.end45:                                         ; preds = %land.lhs.true23, %if.then37, %if.end
  %current.1 = phi i64 [ %inc, %if.then37 ], [ %current.0.mux, %land.lhs.true23 ], [ %current.0111, %if.end ]
  %max.1 = phi i64 [ %cond43, %if.then37 ], [ %max.0112, %land.lhs.true23 ], [ %max.0112, %if.end ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %for.end.loopexit, label %for.body

for.end.loopexit:                                 ; preds = %if.end45
  %9 = icmp sgt i64 %max.1, 2
  br label %for.end

for.end:                                          ; preds = %for.end.loopexit, %entry
  %max.0.lcssa = phi i1 [ false, %entry ], [ %9, %for.end.loopexit ]
  %10 = load i64, ptr %c, align 8, !tbaa !5
  %11 = load i64, ptr %d, align 8, !tbaa !5
  %cmp52 = icmp slt i64 %10, %11
  %or.cond = select i1 %cmp52, i1 true, i1 %max.0.lcssa
  br i1 %or.cond, label %cleanup75, label %lor.lhs.false56

lor.lhs.false56:                                  ; preds = %for.end
  %12 = load i64, ptr %b, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %call1, i64 %12
  %arrayidx57 = getelementptr i8, ptr %13, i64 -1
  %14 = load i8, ptr %arrayidx57, align 1, !tbaa !11, !range !13, !noundef !14
  %tobool58.not = icmp eq i8 %14, 0
  br i1 %tobool58.not, label %lor.rhs, label %land.lhs.true60

land.lhs.true60:                                  ; preds = %lor.lhs.false56
  %arrayidx62 = getelementptr i8, ptr %13, i64 1
  %15 = load i8, ptr %arrayidx62, align 1, !tbaa !11, !range !13, !noundef !14
  %tobool63.not = icmp eq i8 %15, 0
  br i1 %tobool63.not, label %lor.rhs, label %cleanup75

lor.rhs:                                          ; preds = %land.lhs.true60, %lor.lhs.false56
  %16 = getelementptr i8, ptr %call1, i64 %11
  %arrayidx66 = getelementptr i8, ptr %16, i64 -1
  %17 = load i8, ptr %arrayidx66, align 1, !tbaa !11, !range !13, !noundef !14
  %tobool67.not = icmp eq i8 %17, 0
  br i1 %tobool67.not, label %cleanup75, label %land.rhs

land.rhs:                                         ; preds = %lor.rhs
  %arrayidx70 = getelementptr i8, ptr %16, i64 1
  %18 = load i8, ptr %arrayidx70, align 1, !tbaa !11, !range !13, !noundef !14
  %tobool71.not = icmp eq i8 %18, 0
  %19 = select i1 %tobool71.not, ptr @.str.1, ptr @.str.2
  br label %cleanup75

cleanup75:                                        ; preds = %land.lhs.true, %for.end, %land.lhs.true60, %land.rhs, %lor.rhs
  %.str.1.sink = phi ptr [ @.str.2, %land.lhs.true60 ], [ @.str.2, %for.end ], [ @.str.1, %lor.rhs ], [ %19, %land.rhs ], [ @.str.1, %land.lhs.true ]
  %call19 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #5
  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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #4

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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
