#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 *);
int /*<<< orphan*/ scanf(char *, double *, double *, double *, double *);
int main() {
  double pa = 0, pg = 0, ra = 0, rg = 0;
  scanf("%lf %lf %lf %lf", &pa, &pg, &ra, &rg);
  if (ra / pa > rg / pg)
    printf("A");
  else
    printf("G");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
call   1040 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    119a <main+0x7a>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    11a6 <main+0x86>
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movq   $0x0,0x20(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0xeb1(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movhpd 0x8(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movhpd 0x18(%rsp),%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
ucomisd %xmm1,%xmm0
mov    $0x41,%eax
mov    $0x47,%edi
cmova  %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%lf %lf %lf %lf\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"G\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
store double 0.000000e+00, double* %5
%6 = call i32 @scanf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4, double* %5)
%7 = load double, double* %4
%8 = load double, double* %2
%9 = fdiv double %7, %8
%10 = load double, double* %5
%11 = load double, double* %3
%12 = fdiv double %10, %11
%13 = fcmp ogt double %9, %12
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %18
16: ; preds = %0
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"%lf %lf %lf %lf\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%6 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%7 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%8 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %4
%9 = call i32 @scanf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4)
%10 = load double, double* %3
%11 = load double, double* %1
%12 = load double, double* %4
%13 = load double, double* %2
%14 = insertelement <2 x double> poison, double %10, i64 0
%15 = insertelement <2 x double> %14, double %12, i64 1
%16 = insertelement <2 x double> poison, double %11, i64 0
%17 = insertelement <2 x double> %16, double %13, i64 1
%18 = fdiv <2 x double> %15, %17
%19 = extractelement <2 x double> %18, i64 0
%20 = extractelement <2 x double> %18, i64 1
%21 = fcmp ogt double %19, %20
%22 = select i1 %21, i32 65, i32 71
%23 = call i32 @putchar(i32 %22)
ret i32 0
}