#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *);
int /*<<< orphan*/ sort_2(int *);
int /*<<< orphan*/ sort_3(int *);
int main(int argc, char *noargs[]) {
  int a[3], h[2];
  char res;
  scanf("%d %d %d %d %d", &a[0], &a[1], &a[2], &h[0], &h[1]);
  sort_3(a);
  sort_2(h);
  if ((a[0] <= h[0]) && (a[1] <= h[1]))
    res = 'S';
  else
    res = 'N';
  printf("%c\n", res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1c(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
add    $0x4,%rdx
lea    -0x1c(%rbp),%rcx
add    $0x8,%rcx
lea    -0x24(%rbp),%r8
lea    -0x24(%rbp),%r9
add    $0x4,%r9
lea    0xe83(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x1c(%rbp),%rdi
call   1040 <sort_3@plt>
lea    -0x24(%rbp),%rdi
call   1060 <sort_2@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     11b5 <main+0x75>
mov    -0x18(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     11b5 <main+0x75>
movb   $0x53,-0x25(%rbp)
jmp    11b9 <main+0x79>
movb   $0x4e,-0x25(%rbp)
lea    0xe4f(%rip),%rdi
movsbl -0x25(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0x10(%rsp),%rdx
lea    0x14(%rsp),%rcx
lea    0x8(%rsp),%r9
lea    0xea3(%rip),%rdi
lea    0xc(%rsp),%rbx
lea    0x4(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%r8
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <sort_3@plt>
mov    %r14,%rdi
call   1060 <sort_2@plt>
mov    0xc(%rsp),%eax
cmp    0x4(%rsp),%eax
jg     1198 <main+0x58>
mov    0x10(%rsp),%ecx
mov    $0x53,%al
cmp    0x8(%rsp),%ecx
jle    119a <main+0x5a>
mov    $0x4e,%al
movzbl %al,%esi
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%d %d %d %d %d\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i32]
%7 = alloca [2 x i32]
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%14 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %9, i32* %10, i32* %11, i32* %12, i32* %13)
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%16 = call i32 @sort_3(i32* %15)
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%18 = call i32 @sort_2(i32* %17)
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%20 = load i32, i32* %19
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%22 = load i32, i32* %21
%23 = icmp sle i32 %20, %22
br i1 %23, label %24, label %31
24: ; preds = %2
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
%26 = load i32, i32* %25
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%28 = load i32, i32* %27
%29 = icmp sle i32 %26, %28
br i1 %29, label %30, label %31
30: ; preds = %24
store i8 83, i8* %8
br label %32
31: ; preds = %24, %2
store i8 78, i8* %8
br label %32
32: ; preds = %31, %30
%33 = load i8, i8* %8
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d %d %d %d %d\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i32]
%4 = alloca [2 x i32]
%5 = bitcast [3 x i32]* %3 to i8*
%6 = bitcast [2 x i32]* %4 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%12 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %8, i32* %9, i32* %10, i32* %11)
%13 = call i32 @sort_3(i32* %7)
%14 = call i32 @sort_2(i32* %10)
%15 = load i32, i32* %7
%16 = load i32, i32* %10
%17 = icmp sgt i32 %15, %16
br i1 %17, label %22, label %18
18: ; preds = %2
%19 = load i32, i32* %8
%20 = load i32, i32* %11
%21 = icmp sgt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18, %2
br label %23
23: ; preds = %18, %22
%24 = phi i8 [ 78, %22 ], [ 83, %18 ]
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %24)
ret i32 0
}