#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 */
scalar_t__ formaTriangulo(int, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main(void) {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  if (formaTriangulo(a, b, c) || formaTriangulo(a, b, d) ||
      formaTriangulo(a, c, d) || formaTriangulo(b, c, d)) {
    printf("S\n");
  } else {
    printf("N\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <formaTriangulo@plt>
cmp    $0x0,%rax
jne    11bb <main+0x8b>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <formaTriangulo@plt>
cmp    $0x0,%rax
jne    11bb <main+0x8b>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <formaTriangulo@plt>
cmp    $0x0,%rax
jne    11bb <main+0x8b>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <formaTriangulo@plt>
cmp    $0x0,%rax
je     11cc <main+0x9c>
lea    0xe4a(%rip),%rdi
call   1040 <printf@plt>
jmp    11d8 <main+0xa8>
lea    0xe3c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
mov    %rsp,%r8
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
call   1040 <formaTriangulo@plt>
lea    0xea3(%rip),%rbx
test   %rax,%rax
jne    11bf <main+0x8f>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    (%rsp),%edx
call   1040 <formaTriangulo@plt>
test   %rax,%rax
jne    11bf <main+0x8f>
mov    0xc(%rsp),%edi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
call   1040 <formaTriangulo@plt>
test   %rax,%rax
jne    11bf <main+0x8f>
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
call   1040 <formaTriangulo@plt>
test   %rax,%rax
lea    0xe58(%rip),%rax
lea    0xe53(%rip),%rbx
cmove  %rax,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
@str = [2 x i8] c"N\00"
@str.3 = [2 x i8] c"S\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = call i64 @formaTriangulo(i32 %10, i32 %11, i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %34
15: ; preds = %0
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = load i32, i32* %4
%19 = call i64 @formaTriangulo(i32 %16, i32 %17, i32 %18)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %34
21: ; preds = %15
%22 = load i32, i32* %1
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = call i64 @formaTriangulo(i32 %22, i32 %23, i32 %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %34
27: ; preds = %21
%28 = load i32, i32* %2
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = call i64 @formaTriangulo(i32 %28, i32 %29, i32 %30)
%32 = icmp eq i64 %31, 0
%33 = select i1 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0)
br label %34
34: ; preds = %27, %0, %15, %21
%35 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0), %21 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0), %15 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0), %0 ], [ %33, %27 ]
%36 = call i32 @puts(i8* dereferenceable(1) %35)
ret i32 0
}