#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__ EOF;
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, double *, double *, double *, double *, double *,
                 double *, double *, double *);
float theta(double, double, double, double);
int main(void) {
  int a;
  double xa, ya, xb, yb, xc, yc, xd, yd;
  float alpha;
  while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf\n", &xa, &ya, &xb, &yb, &xc,
               &yc, &xd, &yd) != EOF) {
    alpha = theta(xb - xa, yb - ya, xd - xa, yd - ya) +
            theta(xa - xb, ya - yb, xc - xb, yc - yb) +
            theta(xd - xc, yd - yc, xb - xc, yb - yc) +
            theta(xa - xd, ya - yd, xc - xd, yc - yd);
    a = alpha * 1000000;
    if (a == 6283185) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
lea    -0x38(%rbp),%r11
lea    -0x40(%rbp),%r10
lea    -0x48(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1050 <scanf@plt>
mov    0x2e68(%rip),%rcx
cmp    (%rcx),%rax
je     12b8 <main+0x188>
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm3
subsd  -0x18(%rbp),%xmm3
call   1040 <theta@plt>
movss  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
subsd  -0x20(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
subsd  -0x28(%rbp),%xmm3
call   1040 <theta@plt>
movaps %xmm0,%xmm1
movss  -0x58(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movsd  -0x40(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
subsd  -0x38(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
subsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
subsd  -0x38(%rbp),%xmm3
call   1040 <theta@plt>
movaps %xmm0,%xmm1
movss  -0x54(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x48(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
subsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
subsd  -0x48(%rbp),%xmm3
call   1040 <theta@plt>
movaps %xmm0,%xmm1
movss  -0x50(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  0xd83(%rip),%xmm0
mulss  -0x4c(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5fdfb1,-0x8(%rbp)
jne    12a7 <main+0x177>
lea    0xd88(%rip),%rdi
call   1030 <printf@plt>
jmp    12b3 <main+0x183>
lea    0xd7c(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
sub    $0x8,%rsp
lea    0x10(%rsp),%rax
lea    0x18(%rsp),%rbp
lea    0x20(%rsp),%rbx
lea    0xeac(%rip),%rdi
lea    0x48(%rsp),%rsi
lea    0x40(%rsp),%rdx
lea    0x38(%rsp),%rcx
lea    0x30(%rsp),%r8
lea    0x28(%rsp),%r9
push   %rax
push   %rbp
push   %rbx
call   1050 <scanf@plt>
add    $0x20,%rsp
mov    0x2e64(%rip),%r14
cmp    (%r14),%rax
jne    119a <main+0x6a>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x40(%rsp),%r15
lea    0x38(%rsp),%r12
lea    0x30(%rsp),%r13
lea    0x28(%rsp),%rbx
lea    0x20(%rsp),%rbp
jmp    11ff <main+0xcf>
cs nopw 0x0(%rax,%rax,1)
nop
call   1030 <puts@plt>
sub    $0x8,%rsp
lea    0xe34(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
mov    %rbp,%r9
lea    0x10(%rsp),%rax
push   %rax
lea    0x20(%rsp),%rax
push   %rax
lea    0x30(%rsp),%rax
push   %rax
call   1050 <scanf@plt>
add    $0x20,%rsp
cmp    (%r14),%rax
je     1189 <main+0x59>
movsd  0x30(%rsp),%xmm0
movsd  0x40(%rsp),%xmm3
subsd  %xmm3,%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x38(%rsp),%xmm4
subsd  %xmm4,%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm3,%xmm2
movsd  0x8(%rsp),%xmm3
subsd  %xmm4,%xmm3
call   1040 <theta@plt>
movss  %xmm0,0x4(%rsp)
movsd  0x40(%rsp),%xmm0
movsd  0x30(%rsp),%xmm3
subsd  %xmm3,%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x28(%rsp),%xmm4
subsd  %xmm4,%xmm1
movsd  0x20(%rsp),%xmm2
subsd  %xmm3,%xmm2
movsd  0x18(%rsp),%xmm3
subsd  %xmm4,%xmm3
call   1040 <theta@plt>
addss  0x4(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0x20(%rsp),%xmm3
subsd  %xmm3,%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x18(%rsp),%xmm4
subsd  %xmm4,%xmm1
movsd  0x30(%rsp),%xmm2
subsd  %xmm3,%xmm2
movsd  0x28(%rsp),%xmm3
subsd  %xmm4,%xmm3
call   1040 <theta@plt>
addss  0x4(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
movsd  0x40(%rsp),%xmm0
movsd  0x10(%rsp),%xmm3
subsd  %xmm3,%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x8(%rsp),%xmm4
subsd  %xmm4,%xmm1
movsd  0x20(%rsp),%xmm2
subsd  %xmm3,%xmm2
movsd  0x18(%rsp),%xmm3
subsd  %xmm4,%xmm3
call   1040 <theta@plt>
addss  0x4(%rsp),%xmm0
mulss  0xcf1(%rip),%xmm0
cvttss2si %xmm0,%eax
lea    0xd0e(%rip),%rdi
cmp    $0x5fdfb1,%eax
je     11c0 <main+0x90>
lea    0xcf9(%rip),%rdi
jmp    11c0 <main+0x90>

LLVM IR (-O0):
@.str = [33 x i8] c"%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf\0A\00"
@EOF = global i64 0
@.str.1 = [5 x i8] c"YES\0A\00"
@.str.2 = [4 x i8] c"NO\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca float
store i32 0, i32* %1
br label %12
12: ; preds = %81, %0
%13 = call i64 @scanf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10)
%14 = load i64, i64* @EOF
%15 = icmp ne i64 %13, %14
br i1 %15, label %16, label %82
16: ; preds = %12
%17 = load double, double* %5
%18 = load double, double* %3
%19 = fsub double %17, %18
%20 = load double, double* %6
%21 = load double, double* %4
%22 = fsub double %20, %21
%23 = load double, double* %9
%24 = load double, double* %3
%25 = fsub double %23, %24
%26 = load double, double* %10
%27 = load double, double* %4
%28 = fsub double %26, %27
%29 = call float @theta(double %19, double %22, double %25, double %28)
%30 = load double, double* %3
%31 = load double, double* %5
%32 = fsub double %30, %31
%33 = load double, double* %4
%34 = load double, double* %6
%35 = fsub double %33, %34
%36 = load double, double* %7
%37 = load double, double* %5
%38 = fsub double %36, %37
%39 = load double, double* %8
%40 = load double, double* %6
%41 = fsub double %39, %40
%42 = call float @theta(double %32, double %35, double %38, double %41)
%43 = fadd float %29, %42
%44 = load double, double* %9
%45 = load double, double* %7
%46 = fsub double %44, %45
%47 = load double, double* %10
%48 = load double, double* %8
%49 = fsub double %47, %48
%50 = load double, double* %5
%51 = load double, double* %7
%52 = fsub double %50, %51
%53 = load double, double* %6
%54 = load double, double* %8
%55 = fsub double %53, %54
%56 = call float @theta(double %46, double %49, double %52, double %55)
%57 = fadd float %43, %56
%58 = load double, double* %3
%59 = load double, double* %9
%60 = fsub double %58, %59
%61 = load double, double* %4
%62 = load double, double* %10
%63 = fsub double %61, %62
%64 = load double, double* %7
%65 = load double, double* %9
%66 = fsub double %64, %65
%67 = load double, double* %8
%68 = load double, double* %10
%69 = fsub double %67, %68
%70 = call float @theta(double %60, double %63, double %66, double %69)
%71 = fadd float %57, %70
store float %71, float* %11
%72 = load float, float* %11
%73 = fmul float %72, 1.000000e+06
%74 = fptosi float %73 to i32
store i32 %74, i32* %2
%75 = load i32, i32* %2
%76 = icmp eq i32 %75, 6283185
br i1 %76, label %77, label %79
77: ; preds = %16
%78 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %81
79: ; preds = %16
%80 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %81
81: ; preds = %79, %77
br label %12
82: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf\0A\00"
@EOF = global i64 0
@str = [3 x i8] c"NO\00"
@str.3 = [4 x i8] c"YES\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = bitcast double* %1 to i8*
%10 = bitcast double* %2 to i8*
%11 = bitcast double* %3 to i8*
%12 = bitcast double* %4 to i8*
%13 = bitcast double* %5 to i8*
%14 = bitcast double* %6 to i8*
%15 = bitcast double* %7 to i8*
%16 = bitcast double* %8 to i8*
%17 = call i64 @scanf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
br i1 %19, label %76, label %20
20: ; preds = %0, %20
%21 = load double, double* %3
%22 = load double, double* %1
%23 = fsub double %21, %22
%24 = load double, double* %4
%25 = load double, double* %2
%26 = fsub double %24, %25
%27 = load double, double* %7
%28 = fsub double %27, %22
%29 = load double, double* %8
%30 = fsub double %29, %25
%31 = call float @theta(double %23, double %26, double %28, double %30)
%32 = load double, double* %1
%33 = load double, double* %3
%34 = fsub double %32, %33
%35 = load double, double* %2
%36 = load double, double* %4
%37 = fsub double %35, %36
%38 = load double, double* %5
%39 = fsub double %38, %33
%40 = load double, double* %6
%41 = fsub double %40, %36
%42 = call float @theta(double %34, double %37, double %39, double %41)
%43 = fadd float %31, %42
%44 = load double, double* %7
%45 = load double, double* %5
%46 = fsub double %44, %45
%47 = load double, double* %8
%48 = load double, double* %6
%49 = fsub double %47, %48
%50 = load double, double* %3
%51 = fsub double %50, %45
%52 = load double, double* %4
%53 = fsub double %52, %48
%54 = call float @theta(double %46, double %49, double %51, double %53)
%55 = fadd float %43, %54
%56 = load double, double* %1
%57 = load double, double* %7
%58 = fsub double %56, %57
%59 = load double, double* %2
%60 = load double, double* %8
%61 = fsub double %59, %60
%62 = load double, double* %5
%63 = fsub double %62, %57
%64 = load double, double* %6
%65 = fsub double %64, %60
%66 = call float @theta(double %58, double %61, double %63, double %65)
%67 = fadd float %55, %66
%68 = fmul float %67, 1.000000e+06
%69 = fptosi float %68 to i32
%70 = icmp eq i32 %69, 6283185
%71 = select i1 %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0)
%72 = call i32 @puts(i8* dereferenceable(1) %71)
%73 = call i64 @scanf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8)
%74 = load i64, i64* @EOF
%75 = icmp eq i64 %73, %74
br i1 %75, label %76, label %20
76: ; preds = %20, %0
ret i32 0
}