<?php
// Retrieve input
$stdin = fopen('php://stdin', 'r');
function g() {
	global $stdin;
	return explode(" ", trim(fgets($stdin)));
}

// Codeforces Contest 176 Div 2 Problem A
for ($i = 0; $i < 4; $i++) {
	$raw = g();
	for ($j = 0; $j < 4; $j++) {
		$x[$i][$j] = ((substr($raw[0], $j, 1) == "#") ? 1 : 0);
	}
}

function square($i,$j) {
	global $x;
	return $x[$i][$j] + $x[$i][$j+1] + $x[$i+1][$j] + $x[$i+1][$j+1];
}

for ($i = 0; $i < 3; $i++) {
	for ($j = 0; $j < 3; $j++) {
		if (square($i, $j) != 2) {echo "YES"; exit;}
	}
}

echo "NO";

// End of submission file
// Submission by chaotic_iak
?>


<?php
$names = array("vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon");
$num = (int)trim(fgets(STDIN));
$str = trim(fgets(STDIN));
$rezult='';

if ($num<6 || $num >8) exit;

foreach($names as $k=>$v){
if(strlen($v)==$num){
$temp=0;
for($i=0;$i<=strlen($str)-1;$i++){

if($v[$i]==$str[$i] || $str[$i]=='.'){
$temp++;
}

}
if($temp==$num){$rezult=$v;}
}
}

print $rezult;
?>

<?php

$len = (int)trim(fgets(STDIN));

if ($len < 6 OR $len > 8) exit;

$letter = trim(fgets(STDIN));

if ($len !== strlen($letter)) exit;

$pokemons = array("vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon");

$letters = array();
for ($i=0; $i<$len; $i++)
{
    if ($letter{$i} === '.') continue;
    $letters[$i] = $letter{$i};
}

$result = '';
foreach ($pokemons as $pokemon)
{
    if (strlen($pokemon) !== $len) continue;

    $find = TRUE;
    foreach ($letters as $k => $v)
        if ($pokemon{$k} !== $v)
            $find = FALSE;

    if ($find)
    {
        $result = $pokemon;
        break;
    }
}

print $result;

<?php

//$t = microtime(true);
$n = (int)(trim(readln()));

if ($n === 6) {
	echo 'espeon';
	die();
}
elseif ($n === 8) {
	echo 'vaporeon';
	die();
}
elseif ($n === 7) {
	$ar = array(
		'jolteon',
		'flareon',
		'umbreon',
		'leafeon',
		'glaceon',
		'sylveon'
	);
	$str = trim(readln());
	for($i = 0; $i < 7; $i++) {
		$char = $str[$i];
		if ($str[$i] === '.') {
			continue;
		}
		$ar = array_filter($ar, function($item) use ($char, $i) {
			return $item[$i] == $char;
		});
	}
	echo reset($ar);
}

//echo $t - microtime(true);
function readln()
{
	static $input =null;
	if ($input === null) {
		$input = fopen('php://STDIN', 'r');
//		$debug = __FILE__ . '.txt';
//		var_dump($debug);
//		$input = fopen($debug, 'r');
	}
	return trim(fgets($input));
}

<?php
fscanf(STDIN,"%d",$n);
$str=trim(fgets(STDIN));
$eve=[
		 0=>"vaporeon",
		 1=>"jolteon",
		 2=>"flareon",
		 3=>"espeon",
		 4=>"umbreon",
		 5=>"leafeon",
		 6=>"glaceon",
		 7=>"sylveon"
    ];
 $ev1="vaporeon";
 $ev2="jolteon";
 $ev3="flareon";
 $ev4="espeon";
 $ev5="umbreon";
 $ev6="leafeon";
 $ev7="glaceon";
 $ev8="sylveon";
if($str=='......')
echo "espeon";
elseif ($str=='........')
 {
 	echo "vaporeon";
	# code...
}

else
{

   $flag=0;
   $max=0;
   //$length=9;
   $trgetStr=findTrgtStr($str);
for ($i=0; $i <count($eve) ; $i++)
{

	$count=0;

   for ($j=0; $j <5 ; $j++)
    {

   	   if($eve[$i][$j]==$trgetStr[$count])
   	   {

   	   	   $count++;
   	   	  // $str3=$eve[$i];

   	   	   if($count==strlen($trgetStr))
   	   	   {
             //echo "$str3\n";
   	   	   	$flag=1;
   	   	   	break;
   	   	   }
   	   }

    }

          if($count>=$max&&strlen($eve[$i])==$n)
          {
          	$max=$count;
          	//$length=strlen($eve[$i]);
          	$str3=$eve[$i];
          }
          //echo "$max\n";

}
print_r($str3);
}

function findTrgtStr($str)
{
	$trgetStr="";
for ($i=0; $i <strlen($str) ; $i++)
{
	if($str[$i]=='.')
		continue;
	else
		$trgetStr.=$str[$i];

}
return $trgetStr;
}

<?php
fscanf(STDIN,"%d",$n);
$str=trim(fgets(STDIN));
$eve=[
		 0=>"vaporeon",
		 1=>"jolteon",
		 2=>"flareon",
		 3=>"espeon",
		 4=>"umbreon",
		 5=>"leafeon",
		 6=>"glaceon",
		 7=>"sylveon"
    ];

if($str=='......')
echo "espeon";
elseif ($str=='........')
 {
 	echo "vaporeon";
	# code...
}

else
{

   $flag=0;
   $max=0;
   //$length=9;
   $trgetStr=findTrgtStr($str);
for ($i=0; $i <count($eve) ; $i++)
{

	$count=0;

   for ($j=0; $j <5 ; $j++)
    {

   	   if($eve[$i][$j]==$trgetStr[$count])
   	   {

   	   	   $count++;
   	   	  // $str3=$eve[$i];

   	   	   if($count==strlen($trgetStr))
   	   	   {
             //echo "$str3\n";
   	   	   	$flag=1;
   	   	   	break;
   	   	   }
   	   }

    }

          if($count>=$max&&strlen($eve[$i])==$n)
          {
          	$max=$count;
          	//$length=strlen($eve[$i]);
          	$str3=$eve[$i];
          }
          //echo "$max\n";

}
print_r($str3);
}

function findTrgtStr($str)
{
	$trgetStr="";
for ($i=0; $i <strlen($str) ; $i++)
{
	if($str[$i]=='.')
		continue;
	else
		$trgetStr.=$str[$i];

}
return $trgetStr;
}

<?php
/**
 * User: Nash
 * Date: 7/27/14
 * Time: 10:29 PM
 */
$in = fopen('php://stdin', 'r');

$names = array("jolteon", "flareon", "umbreon", "leafeon", "glaceon", "sylveon");
$pos = array(1,1,1,1,1,1);
$n = intval(rtrim(fgets($in)));
$s = rtrim(fgets($in));

if($n==6){
    echo "espeon";
}
else if($n==8){
    echo "vaporeon";
}else{
    $c = 6;
    for($i=0; $i<$n; $i++){
        if($s[$i]!="."){
            foreach($names as $k => $name){
                if($pos[$k] && $s[$i]!=$name[$i]){
                    $pos[$k] = 0;
                    $c--;
                }
            }
            if($c==1){
                break;
            }
        }
    }

    for($i=0; $i<$n; $i++){
        if($pos[$i]){
            echo $names[$i];
            break;
        }
    }

}

<?php
$pokemons = array("vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon");
$num = (int)trim(fgets(STDIN));
$str = trim(fgets(STDIN));

print 'jolteon';
?>

<?php
fscanf(STDIN,"%d",$n);
$str=trim(fgets(STDIN));
$trgetStr="";
for ($i=0; $i <strlen($str) ; $i++)
{
	if($str[$i]=='.')
		continue;
	else
		$trgetStr.=$str[$i];

}
$eve=[
		 0=>"vaporeon",
		 1=>"jolteon",
		 2=>"flareon",
		 3=>"espeon",
		 4=>"umbreon",
		 5=>"leafeon",
		 6=>"glaceon",
		 7=>"sylveon"
    ];

   $flag=0;
   $max=0;
for ($i=0; $i <count($eve) ; $i++)
{   $count=0;
   for ($j=0; $j <5 ; $j++)
    {

   	   if($eve[$i][$j]==$trgetStr[$count])
   	   {

   	   	   $count++;
   	   	  // $str3=$eve[$i];

   	   	   if($count==strlen($trgetStr))
   	   	   {
             //echo "$str3\n";
   	   	   	$flag=1;
   	   	   	break;
   	   	   }
   	   }

    }
          if($count>=$max)
          {
          	$max=$count;
          	$str3=$eve[$i];
          }
          //echo "$max\n";

   if($flag==1)
   	break;

}
echo "$str3\n";

<?php
fscanf(STDIN,"%d",$n);
$str=trim(fgets(STDIN));
if($str=='......')
echo "espeon";
elseif ($str=='........')
 {
 	echo "vaporeon";
	# code...
}
else
{
$trgetStr="";
for ($i=0; $i <strlen($str) ; $i++)
{
	if($str[$i]=='.')
		continue;
	else
		$trgetStr.=$str[$i];

}
$eve=[
		 0=>"vaporeon",
		 1=>"jolteon",
		 2=>"flareon",
		 3=>"espeon",
		 4=>"umbreon",
		 5=>"leafeon",
		 6=>"glaceon",
		 7=>"sylveon"
    ];

   $flag=0;
   $max=0;
for ($i=0; $i <count($eve) ; $i++)
{   $count=0;
   for ($j=0; $j <5 ; $j++)
    {

   	   if($eve[$i][$j]==$trgetStr[$count])
   	   {

   	   	   $count++;
   	   	  // $str3=$eve[$i];

   	   	   if($count==strlen($trgetStr))
   	   	   {
             //echo "$str3\n";
   	   	   	$flag=1;
   	   	   	break;
   	   	   }
   	   }

    }
          if($count>=$max)
          {
          	$max=$count;
          	$str3=$eve[$i];
          }
          //echo "$max\n";

   if($flag==1)
   	break;

}
echo "$str3\n";
}


<?php
# 1180A
$stdin = STDIN;
[$n] = fscanf($stdin, '%u');
$quarter = 0;
$quarterLimit = $n - 1;
for ($i = 1; $i <= $quarterLimit; $i++) {
    $quarter += $i;
}
echo $quarter * 4 + 1;

<?php
$n = trim(fgets(STDIN));
echo $n ** 2 + ($n - 1) ** 2;

<?php
   $n = trim(fgets(STDIN));

    echo pow($n, 2) + pow($n-1, 2);

?>

<?php
$input=trim(fgets(STDIN));
$sum=0;
$array=range(1,1000,2);
for ($i=0;$i<$input;$i++) {
      $sum+=$array[$i];
}
$sum=$sum*2-$array[$input-1];
echo $sum;


<?php
$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [0];
$t = array_merge($t, explode(" ", trim(fgets($input))));
$tt = [];
foreach ($t as $i) {
    array_push($tt, intval($i));
}
array_push($tt, 90);
$isTVOff = false;
for ($i = 0; $i < count($tt) - 1; $i++) {
    if ($tt[$i + 1] - $tt[$i] > 15) {
        echo($tt[$i] + 15);
        $isTVOff = true;
        break;
    }
}
if (!$isTVOff) {
    echo(90);
}

<?php

###### IO ######
error_reporting(E_ALL);
error_reporting(0);

function readString($f) {
	$r = array(
		"\r" => '',
		"\n" => '',
	);
	return strtr(fgets($f), $r);
}

function readNumString($f) {
	return trim(fgets($f));
}

function stringToArray($str) {
	return str_split($str);
}

function readNum($f, $is_int = false) {
	$v = readNumString($f);
	return $is_int ? intval($v) : floatval($v);
}

function readStringExplode($f, $delimiter = ' ') {
	$v = readNumString($f);
	if ($delimiter == '') {
		$return = stringToArray($v);
	} else {
		$return = explode($delimiter, $v);
	}
	$callf = 'trim';
	return array_map($callf, $return);
}

function readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {
	$v = readNumString($f);
	if ($delimiter == '') {
		$return = stringToArray($v);
	} else {
		$return = explode($delimiter, $v);
	}
	$callf = $is_int ? 'intval' : 'floatval';
	return array_map($callf, $return);
}

###### /IO ######

function getAnswer($is_test = false, $f = false) {
	if ($is_test === false) {
		$f = STDIN;
	}
	/* begin body */
	$n = readNum($f);
	$times = readStringExplodeNum($f, ' ', true);
	$f = 0;
	$viewTime = 0;
	for ($i = 1; $i <= 90; $i++) {
		if (in_array($i, $times)) {
			$f = 0;
		} else {
			$f ++;
		}

		$viewTime++;
		if ($f >= 15) {
			break;
		}
	}
	echo $viewTime;
	/* / end body */
}

if (empty($is_test))
	getAnswer();

<?php
$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [0];
$t = array_merge($t, explode(" ", trim(fgets($input))));
$tt = [];
/*
foreach ($t as $i) {
    array_push($tt, intval($i));
}
array_push($tt, 90);
*/
array_push($t, 90);
$isTVOff = false;
for ($i = 0; $i < count($t) - 1; $i++) {
    if (intval($t[$i + 1]) - intval($t[$i]) > 15) {
        echo($t[$i] + 15);
        $isTVOff = true;
        break;
    }
}
if (!$isTVOff) {
    echo(90);
}

<?php

$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [];
$t = array_merge($t, explode(" ", trim(fgets($input))));

function watchTime($n, $t) {
    $watchTime = 0;
    for($i = 0; $i < $n; $i++){
        if($t[$i]-$watchTime > 15) break;

        $watchTime = $t[$i];
    }
    echo $watchTime+15 > 90 ? 90 : $watchTime+15;
}

watchTime($n,$t);

<?php

$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [];
$t = array_merge($t, explode(" ", trim(fgets($input))));

function watchTime($n, $t) {
    $watchTime = 0;
    $funLimit = 15;
    for($i = 0; $i < $n; $i++){
        $inTime = ceil(($t[$i]-$watchTime)/$funLimit);
        if($inTime > 1){
            break;
        } else {
            $watchTime = $t[$i];
        }
    }
    echo $watchTime+15 > 90 ? 90 : $watchTime+15 ;
}

watchTime($n,$t);

<?php

	$totalInterestingMinutes = readline("");
	$minutes = readline("");

	$minutes = explode(" ", $minutes);

	$prevMin = 0;
	$result = 90;
	$count = count($minutes);
	foreach($minutes as $key => $min) {
		$min = (int)$min;
		if($min - $prevMin > 15) {
			$result = $prevMin + 15;
			break;
		}
		if($min == 90) {
			$result = 90;
			break;
		}
		if($key == $count - 1 && $min + 15 < 90) {
			$result = $min + 15;
			break;
		}
		$prevMin = $min;
	}
	echo $result;
?>

<?php
function test($n,$arr){
    $start = 0;
    for($i = 0;$i< $n ;$i++){
        if(($arr[$i] - $start) > 15) return ($start+15) >= 90 ? 90 : $start+15 ;
        $start = $arr[$i];
    }
    return ($arr[$n-1] + 15) >= 90 ? 90 : $arr[$n-1]+15;
}
    //  Bear and Game
    $in = 'php://stdin';
    $input = fopen($in, "r");
    $n = fgets($input);
    $t = [];
    $t = array_merge($t, explode(" ", trim(fgets($input))));
    echo (test($n,$t));

?>

<?php
// http://codeforces.com/problemset/problem/691/A
$handle = fopen ("php://stdin", "r");
fscanf($handle, "%i",$n);
$arr_temp = fgets($handle);
$arrInput = explode(" ",$arr_temp);
$arr = array_map('intval', $arrInput);

$maxWait = 15;
foreach ($arr as $interestMin) {
	if($interestMin > $maxWait){
		echo $maxWait;die;
	}else{
		$maxWait = $interestMin + 15;
	}
}
echo $maxWait > 90 ? 90 : $maxWait;

?>

<?php

	$totalInterestingMinutes = readline("");
	$minutes = readline("");

	$minutes = explode(" ", $minutes);

	$prevMin = 0;
	foreach($minutes as $min) {
		$min = (int)$min;
		if($min == 90) {
			echo 90;
			break;
		}
		if($min - $prevMin > 15) {
			echo $prevMin + 15;
			break;
		}
		$prevMin = $min;
	}

?>

<?php

	$totalInterestingMinutes = readline("");
	$minutes = readline("");

	$minutes = explode(" ", $minutes);

	$prevMin = 0;
	foreach($minutes as $min) {
		$min = (int)$min;
		if($min == 90) {
			echo 90;
			break;
		}
		if($min - $prevMin > 15) {
			echo $prevMin + 15;
			break;
		}
	}

?>

<?php

	$totalInterestingMinutes = readline("");
	$minutes = readline("");

	$minutes = explode(" ", $minutes);

	$prevMin = 0;
	$result = 90;
	foreach($minutes as $min) {
		$min = (int)$min;
		if($min == 90) {
			$result = 90;
			break;
		}
		if($min - $prevMin > 15) {
			$result = $prevMin + 15;
			break;
		}
		$prevMin = $min;
	}
	echo $result;
?>

<?php

	$totalInterestingMinutes = readline("");
	$minutes = readline("");

	$minutes = explode(" ", $minutes);

	$prevMin = 0;
	foreach($minutes as $min) {
		$min = (int)$min;
		if($min == 90) {
			echo 90;
			break;
		}
		if($min - $prevMin > 15) {
			echo $min + 15;
			break;
		}
	}

?>

<?php

	$totalInterestingMinutes = readline("");
	$minutes = readline("");

	$minutes = explode(" ", $minutes);

	$prevMin = 0;
	$result = 90;
	$count = count($minutes);
	foreach($minutes as $key => $min) {
		$min = (int)$min;
		if($min == 90) {
			$result = 90;
			break;
		}
		if($min - $prevMin > 15) {
			$result = $prevMin + 15;
			break;
		}
		if($key == $count - 1 && $min + 15 < 90) {
			$result = $min + 15;
			break;
		}
		$prevMin = $min;
	}
	echo $result;
?>

<?php
function test($n,$arr){
    $start = 0;
    for($i = 0;$i< $n ;$i++){
        if(($arr[$i] - $start) > 15) return $start+15;
        $start = $arr[$i];
    }
    return $arr[$n-1] + 15;
}
    //  Bear and Game
    $in = 'php://stdin';
    $input = fopen($in, "r");
    $n = fgets($input);
    $t = [];
    $t = array_merge($t, explode(" ", trim(fgets($input))));
    echo (test($n,$t));

?>

<?php
// http://codeforces.com/problemset/problem/691/A
$handle = fopen ("php://stdin", "r");
fscanf($handle, "%i",$n);
$arr_temp = fgets($handle);
$arrInput = explode(" ",$arr_temp);
$arr = array_map('intval', $arrInput);
if(empty($arr)){
	echo 15;
	die;
}
$maxWait = 15;
foreach ($arr as $interestMin) {
	if($interestMin > $maxWait){
		echo $maxWait;die;
	}else{
		$maxWait = $interestMin + 15;
	}
}
echo 90;

?>

<?php

$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [];
$t = array_merge($t, explode(" ", trim(fgets($input))));

function watchTime($n, $t) {
    $watchTime = 0;
    $funLimit = 15;
    for($i = 0; $i < $n; $i++){
        $inTime = ceil(($t[$i]-$watchTime)/$funLimit);
        if($inTime > 1){
            break;
        } else {
            $watchTime = $t[$i];
        }
    }
    echo $watchTime+15 > 90 ? $watchTime : $watchTime+15 ;
}

watchTime($n,$t);

<?php

$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [];
$t = array_merge($t, explode(" ", trim(fgets($input))));
function watchTime($n, $t) {
    $watchTime = 0;
    $funLimit = 15;
    for($i = 0; $i < $n; $i++){
        $inTime = ceil(($t[$i]-$watchTime)/$funLimit);
        if($inTime > 1){
            $watchTime+=15;
            break;
        } else {
            $watchTime = $t[$i];
        }
    }
    echo $watchTime;
}

echo watchTime($n,$t);

<?php

$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [];
$t = array_merge($t, explode(" ", trim(fgets($input))));

function watchTime($n, $t) {
    $watchTime = 0;
    $funLimit = 15;
    for($i = 0; $i < $n; $i++){
        $inTime = ceil(($t[$i]-$watchTime)/$funLimit);
        if($inTime > 1){
            $watchTime+=15;
            break;
        } else {
            $watchTime = $t[$i];
        }
    }
    echo $watchTime > 90 ? 90 : $watchTime;
}

echo watchTime($n,$t);

<?php

$in = 'php://stdin';

$input = fopen($in, "r");

$n = fgets($input);

$t = [];

$t = array_merge($t, explode(" ", trim(fgets($input))));

function kq($t, $n) {

    $temp=1;

    for($i=0;$i<$n;$i++)
    {
        $delta = $t[$i] - $temp;

        if ($delta >= 15) {
            return $temp + 15;
        }

        $temp = $t[$i];
    }

    $temp += 15;

    return $temp >= 90 ? 90 : $temp;
}

echo kq($t,$n);

<?php

$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [];
$t = array_merge($t, explode(" ", trim(fgets($input))));

function watchTime($n, $t) {
    $watchTime = 0;
    $funLimit = 15;
    for($i = 0; $i < $n; $i++){
        $inTime = ceil(($t[$i]-$watchTime)/$funLimit);
        if($inTime > 1){
            $watchTime+=15;
            break;
        } else {
            $watchTime = $t[$i];
        }
    }
    echo $watchTime > 90 ? 90 : $watchTime;
}

watchTime($n,$t);

<?php

$in = 'php://stdin';
$input = fopen($in, "r");
$n = fgets($input);
$t = [];
$t = array_merge($t, explode(" ", trim(fgets($input))));
function watchTime($n, $t) {
    $watchTime = 0;
    $funLimit = 15;
    for($i = 0; $i < $n; $i++){
        echo "[$i] watchTime=$watchTime atTime=$t[$i] ";
        $inTime = ceil(($t[$i]-$watchTime)/$funLimit);

        if($inTime > 1){
            $watchTime+=15;
            echo "inTime=$inTime".PHP_EOL;
            break;
        } else {
            $watchTime = $t[$i];
        }

        echo "inTime=$inTime".PHP_EOL;
    }

    echo $watchTime;
}

echo watchTime($n,$t);


<?php
$a = trim(fgets(STDIN));
$b = floor(sqrt($a));
while(TRUE)
{
     $c = $a % $b;
     if($c == 0)
     {
          break;
     }
     else
     {
          $b--;
     }
}
print $b . " " . ($a / $b);
?>

<?php
class stdIn{var $ntxt = 0;var $nline = 0;var $arr_txt;var $arr_line;var $linex;var $liney;
function stdIn($local = false){if($local){$dir = fopen("input.txt", 'r');}else{$dir = fopen("php://stdin", 'r');}
$datatxt = stream_get_contents($dir);$del = Array("\n","\r","\n\r");$data = explode("\n",$datatxt);	$il = 0;$id = 0;
foreach($data as $line){if(strlen($line) > 0){$line = str_replace($del,'',$line);$dataex[] = $line;$text = explode(" ",$line);
foreach($text as $txt){$arr_txt[] = $txt;$this->linex[$id] = $il;$this->liney[$il] = $id;$id++;}}$il++;}$this->arr_line = $dataex;$this->arr_txt  = $arr_txt;}
function G(){$ret = $this->arr_txt[$this->ntxt++];$this->nline = $this->linex[$this->ntxt];return $ret;}
function GL(){$this->ntxt = $this->liney[$this->nline]+1;return $this->arr_line[$this->nline++];}} /*init*/ $dxs = new stdIn(false);

$n = $dxs->GL();
$a = (int) sqrt($n);

for( ; $a ; $a--) {
	if($n % $a == 0) {
		$t = $n / $a;
		echo min($t, $a) . ' ' . max($t, $b);
		break;
	}
}

<?php
fscanf(STDIN,"%d",$n);
$root=sqrt($n);
if($root==floor($root))
	echo "$root $root";
else
{
		$j=0;
		$quotient=array();
		for ($i=1; $i <=ceil($n/2); $i++)
		 {
			$factor=$n/$i;
			if($factor==floor($factor))
			{
				$quotient[$j++]=$factor;
			}
		 }

		 $quotient[count($quotient)]=1;
		 //print_r($quotient);
		 if(count($quotient)==2)
		 	echo "$quotient[1] $quotient[0]\n";
		 else
		 {
		   $maxDif=10000000;

		 	for ($i=0; $i <count($quotient) ; $i++)
		 	{
		 		 for ($j=0; $j <count($quotient) ; $j++)
		 		  {
		 		 	  if($quotient[$i]*$quotient[$j]==$n)
		 		 	  {
		 		 	  	$dif=abs($quotient[$i]-$quotient[$j]);
		 		 	  	  if($dif<$maxDif)
		 		 	  	  {
		 		 	  	  	$maxDif=$dif;
		 		 	  	  	 $targetValue="$quotient[$j] $quotient[$i]";
		 		 	  	  }
		 		 	  }
		 		 }
		 	}
		 	echo "$targetValue\n";
		 }
}

<?php
fscanf(STDIN,"%d",$lenOfStr);
fscanf(STDIN,"%s",$str);
$decision=false;

if($lenOfStr%4==0)
 {
 	 $a=0;
 	 $g=0;
 	 $c=0;
 	 $t=0;
     $split=str_split($str);
     for ($i=0; $i <count($split) ; $i++)
      {
     	   if($split[$i]=='A')
     	   	   $a++;
     	   	elseif ($split[$i]=='G')
     	   	 {
     	   		$g++;
     	   	 }
     	   	elseif ($split[$i]=='C')
     	   	 {
     	   		$c++;
     	   	 }
     	   	 else
     	   	 {
     	   	 	if($split[$i]=='T')
     	   	 		$t++;
     	   	 }

      }
      $div=$lenOfStr/4;
      if($div<$a||$div<$g||$div<$c||$div<$t)
      	  $decision=false;
       //$loop=$div;
       else
       {

       	    while($a<$div)
       	    {
       	    	for ($i=0; $i <strlen($str) ; $i++)
       	    	 {
       	    		if($str[$i]=='?')
       	    		{
       	    			$str[$i]='A';
       	    			break;
       	    		}
       	    	 }
       	    	$a++;
       	    }
       	    while($c<$div)
       	    {
       	    	for ($i=0; $i <strlen($str) ; $i++)
       	    	 {
       	    		if($str[$i]=='?')
       	    		{
       	    			$str[$i]='C';
       	    			break;
       	    		}
       	    	 }
       	    	$c++;
       	    }
       	    while($g<$div)
       	    {
       	    	for ($i=0; $i <strlen($str) ; $i++)
       	    	 {
       	    		if($str[$i]=='?')
       	    		{
       	    			$str[$i]='G';
       	    			break;
       	    		}
       	    	 }
       	    	$g++;
       	    }
       	    while($t<$div)
       	    {
       	    	for ($i=0; $i <strlen($str) ; $i++)
       	    	 {
       	    		if($str[$i]=='?')
       	    		{
       	    			$str[$i]='T';
       	    			break;
       	    		}
       	    	 }
       	    	$t++;
       	    }

       	    //echo "$str";
        	$decision=true;
       }
 }
 echo $decision?"$str":"===";


<?php
fscanf(STDIN,"%d",$n);
$line=trim(fgets(STDIN));
$singleValue=explode(' ', $line);
for($i=0;$i<$n;$i++){
	for($j=0;$j<$n-1;$j++){
		if($singleValue[$i]<$singleValue[$j])
		{
			$singleValue[$i]=$singleValue[$i]+$singleValue[$j];
			$singleValue[$j]=$singleValue[$i]-$singleValue[$j];
			$singleValue[$i]=$singleValue[$i]-$singleValue[$j];

		}

	}
}
for($i=0;$i<$n;$i++)
	echo "$singleValue[$i] ";

<?php
$n = trim(fgets(STDIN));
$a = trim(fgets(STDIN));
$a = explode( ' ' , $a);
sort($a);
echo join(' ', $a);

<?php

$n = (readline() - 1);
$input = (explode(" ",readline()));

for($i = 0; $i < $n; $i++){
    for($x = 0; $x < $n; $x++) {
        if($input[$x] > $input[$x+1]){
            $z = $input[$x];
            $input[$x] = $input[$x+1];
            $input[$x+1] = $z;
        }
    }
}

$output = implode(" ", $input);

print $output;

?>

<?php

$n = readline();
$input = explode(" ",readline());
sort($input);

print implode(" ", $input);

?>

<?php
$n=trim(fgets(STDIN));
$a = explode(" ",trim(fgets(STDIN)));

sort($a);
for($i=0;$i<$n;$i++)
{
echo $a[$i]." ";
}
?>

<?php
$dir = fopen("php://stdin", 'r');;
$input= file('php://stdin');
$arr= explode(' ',trim($input[1]));
sort($arr);
echo  implode(' ',$arr);

<?php
$dir = fopen("php://stdin", 'r');;
$input= file('php://stdin');
$arr= explode(' ',trim($input[1]));
sort($arr);
foreach ($arr as $item){
    echo  $item . " ";
}

<?php

//=====================================
// link: https://codeforces.com/contest/405/problem/A
//=====================================

// get inputs
$number_of_columns = trim(fgets(STDIN));
$columns_cubes = explode(' ', trim(fgets(STDIN)));

// solution
sort($columns_cubes);
echo implode(' ', $columns_cubes) . "\n";

<?php
	$n = trim(fgets(STDIN));
	$str = trim(fgets(STDIN));
	$strx = explode(" ",$str);
	sort($strx);
	echo implode(" ", $strx);
?>

<?php
    fscanf (STDIN, "%d", $n);
    $arr = explode(" ", trim(fgets(STDIN)));
    sort($arr);
        for ($i = 0; $i < $n; $i++){
            echo ($arr[$i] . " ");
        }

<?php

function r(){
    return trim(fgets(STDIN));
}
function w($str = ''){
    echo $str . "\r\n";
}

$count = r();
$col = explode(' ', r());

do{
    $end = true;
    for($i = 0; $i < $count-1; $i++){
        if($col[$i + 1] > $col[$i]){
            $t = $col[$i + 1];
            $col[$i + 1] = $col[$i];
            $col[$i] = $t;

            $end = false;
        }
    }
}while(!$end);

$col = array_reverse($col);
w(implode(' ', $col));

<?php

$nr = trim(fgets(STDIN));
$arr = explode(' ', trim(fgets(STDIN)));

sort($arr);
$str = implode(' ', $arr);
echo $str;

<?php
$n= trim(fgets(STDIN));
$stolb = explode(" ",trim(fgets(STDIN)));
asort($stolb);
foreach ($stolb as $key)echo $key." ";

<?php
	$stream = fopen("php://stdin", "r");
	$input = stream_get_contents($stream);
    $ins = preg_split("/[\s]+/", $input);
    $cnt = 0;
    $N = $ins[$cnt++];
    for($i = 0; $i < $N; $i++) $arr[$i] = $ins[$cnt++];
    sort($arr);
	for($i = 0; $i < $N; $i++)
		echo "{$arr[$i]} ";
	echo "\n";
?>

<?php

$f = fopen('php://stdin', 'r');
//$f = fopen('test.txt', 'r');
$n = trim(fgets($f));

$a = explode(" ",trim(fgets($f)));

sort($a);
$s = implode(" ",$a);

print_r($s);

<?php

$stdout = fopen(getenv("OUTPUT_PATH"), "w");
$stdin = fopen("php://stdin", "r");

fscanf( $stdin , "%d" , $n ) ;
fscanf( $stdin , "%[^\n]" , $arr ) ;

$array = array_map( 'intval' , preg_split('/ /' , $arr, -1 , PREG_SPLIT_NO_EMPTY ) );
sort( $array ) ;
for( $i=0 ; $i<$n ; $i++ )
{
     echo $array[$i] . " " ;
}

fwrite($stdout);

fclose($stdin);
fclose($stdout);

?>

<?php
$n = fgets(STDIN);
$array = explode(" ", fgets(STDIN));
$output = [];
for($i=0;$i<$n;$i++){
    $output[] =(int)$array[$i];
}
sort($output);
for($i=0;$i<$n;$i++){
    echo $output[$i].' ';
}

<?php
$fi=@fopen('test.inp',"r");
$n=trim(fgets(STDIN));
$a=explode(" ",trim(fgets(STDIN)));
sort($a);
for ($i=0;$i<$n;$i++)
	echo $a[$i]." ";
?>

<?php
$n = trim(fgets(STDIN));
$cube = explode(" ", trim(fgets(STDIN)));
for($i=$n-1;$i>=0;$i--){
    for($j=$n-1;$j>=0;$j--){
		if ($cube[$i] > $cube[$j]){
			$sisa = $cube[$i] - $cube[$j];
			$cube[$j] += $sisa;
			$cube[$i] -= $sisa;
		}
	}
}
foreach($cube as $value){
	echo $value . " ";
}
?>

<?php
	$cin = fopen("php://stdin", "r");
	$n = intval(fgets($cin));
	$s = fgets($cin);
	$a = explode(" ", $s);
	sort($a, SORT_NUMERIC);
	for($i = 0; $i < $n; $i++){
		echo $a[$i]." ";
	}
	fclose($cin);
?>

<?php
// 405A     Переключение гравитации
$in = fopen("php://stdin", 'r');

$input_line = fgets($in);

$input_line = fgets($in);
$arr = preg_split('/ /', substr($input_line, 0, strlen($input_line)-2), -1, PREG_SPLIT_NO_EMPTY);

foreach ($arr as $key => &$value) {
    $value = (int) $value;
}
unset($value);

sort($arr);

$out = implode(" ", $arr);

echo $out;

?>

<?php
	$temp = fopen("php://stdin","r");

	$n = fgets($temp);
	$arr = explode(" ", fgets($temp));

	$int_arr =array();

	foreach($arr as $a )
	{
		$int_arr[] = intval($a);
	}

	sort($int_arr);

	foreach($int_arr as $a)
	{
		echo $a . " ";
	}
?>

<?
$a=fgets(STDIN);
$m=explode(" ",trim(fgets(STDIN)));
sort($m);
echo join(" ",$m);
?>

<?php fgets(STDIN); $a = explode(' ', trim(fgets(STDIN))); sort($a); echo join( ' ',  $a);

<?php

$n = readline();
$input = (explode(" ",readline()));

for($i = 0; $i < ($n-1); $i++){
    for($x = 0; $x < ($n-1); $x++) {
        if($input[$x] > $input[$x+1]){
            $z = $input[$x];
            $input[$x] = $input[$x+1];
            $input[$x+1] = $z;
        } else {
            break;
        }
    }
}

$output = implode(" ", $input);

print $output;

?>

<?php

$n = (readline() - 1);
$input = (explode(" ",readline()));

for($i = 0; $i < $n; $i++){
    for($x = 0; $x < $n-1; $x++) {
        if($input[$x] > $input[$x+1]){
            $z = $input[$x];
            $input[$x] = $input[$x+1];
            $input[$x+1] = $z;
        }
    }
}

$output = implode(" ", $input);

print $output;

?>

<?php
$n=trim(fgets(STDIN));
$a = explode(" ",trim(fgets(STDIN)));

sort($a);
for($i=0;$i<$n;$i++)
{
echo $a[$i];
}
?>

<?php
    $arr = explode(" ", trim(fgets(STDIN)));
    sort($arr);
        for ($i = 0; $i < count($arr); $i++){
            echo ($arr[$i] . " ");
        }

<?php
$n= trim(fgets(STDIN));
$stolb = explode(" ",trim(fgets(STDIN)));
asort($stolb);
foreach ($stolb as $key)echo $key;

<?php
$n = fgets(STDIN);
$array = explode(" ", fgets(STDIN));
sort($array);
for($i=0;$i<$n;$i++){
    echo $array[$i]. ' ';
}

<?php
$n = fgets(STDIN);
$array = explode(" ", fgets(STDIN));
sort($array);
echo implode(' ',$array);

<?php
$n = fgets(STDIN);
$array = explode(" ", fgets(STDIN));
sort($array);
echo $output = implode(' ',$array);

<?
$a=fgets(STDIN);
$m=explode(" ",fgets(STDIN));
sort($m);
foreach($m as $v)
    {
        echo $v." ";
    }
?>

<?
$a=fgets(STDIN);
$m=explode(" ",trim(" ",fgets(STDIN)));
sort($m);
foreach($m as $v)
    {
        echo $v." ";
    }
?>


<?php

$inputLine = fgets(STDIN);

$input = explode(' ', $inputLine);

$n = (float) $input[0];

$k = (float) $input[1];

$pr = $n / 2.0;

$nParts = $k + 1;

$partSize = $pr / $nParts;

$dipF = $partSize;

$dip1 = ceil($dipF);

$gr1 = $dip1 * $k;

if ($gr1 + $dip1 <= $pr) {
    echo $dip1 . ' ' . $gr1 . ' ' . ($n - $dip1 - $gr1);
    exit;
}

$dip2 = floor($dipF);

$gr2 = $dip2 * $k;

echo $dip2 . ' ' . $gr2 . ' ' . ($n - $dip2 - $gr2);

<?php

$inputLine = fgets(STDIN);

echo $inputLine;


<?php
error_reporting("off");
//389A: Fox and Number Game
$n = trim(fgets(STDIN)); //$n = 2;
$array = explode(" ", trim(fgets(STDIN))); //$array = explode(" ", "45 12 27 30 18");
while (true) {
	arsort($array);
	$nums = array_unique($array);
	rsort($nums);
	if (count($nums) == 1) {
		break;
	}
	$biggest = $nums[0];
	$second = $nums[1];
	$indexone = array_search($biggest, $array);
	$indextwo = array_search($second, $array);
	$array[$indexone] = $biggest - $second;
}
$sum = 0;
foreach ($array as $value) {
	$sum += $value;
}
echo $sum;
?>

#!/usr/bin/env php
<?php
$count = trim(fgets(STDIN));

$line = trim(fgets(STDIN));
$array = array_map('intval', explode(' ', $line));

for(;;) {
	rsort($array);
	if ($array[0] !== $array[$count - 1] && $array[1] !== 0) {
		$sub = $array[1];
		for ($i = 1; $i < $count; $i++) {
			if ($array[$i] !== $array[0]) {
				$sub = $array[$i];
				break;
			}
		}
		$array[0] = $array[0] - $sub;
	} else {
		echo array_sum($array);exit();
	}
}

<?php
$a = trim(fgets(STDIN));
$b = explode(" ", trim(fgets(STDIN)));
rsort($b);
for($x = 1; $x <= 10000; $x++)
{
    if($b[0] > $b[count($b) - 1])
    {
        $b[0] = $b[0] - $b[count($b) - 1];
        rsort($b);
    }
    else
    {
        break;
    }
}
print array_sum($b);
?>

<?php
$a = trim(fgets(STDIN));
$b = explode(" ", trim(fgets(STDIN)));
rsort($b);
for($x = 1; $x <= 10000; $x++)
{
    if($b[0] > $b[1])
    {
        $b[0] = $b[0] - $b[1];
        rsort($b);
    }
    else
    {
        break;
    }
}
print array_sum($b);
?>

#!/usr/bin/env php
<?php
$count = trim(fgets(STDIN));

$line = trim(fgets(STDIN));
$array = array_map('intval', explode(' ', $line));

for(;;) {
	rsort($array);
	if ($array[0] !== $array[$count - 1] && $array[1] !== 0) {
		$array[0] = $array[0] - $array[1];
	} else {
		echo array_sum($array);exit();
	}
}

#!/usr/bin/env php
<?php
$count = trim(fgets(STDIN));

$line = trim(fgets(STDIN));
$array = array_map('intval', explode(' ', $line));

for(;;) {
	rsort($array);
	if ($array[0] !== $array[1]) {
		$array[0] = $array[0] - $array[1];
	} else {
		echo array_sum($array);exit();
	}
}

#!/usr/bin/env php
<?php
$count = trim(fgets(STDIN));

$line = trim(fgets(STDIN));
$array = array_map('intval', explode(' ', $line));
echo 'working', PHP_EOL;
for(;;) {
	rsort($array);
	if ($array[0] !== $array[$count - 1] && $array[1] !== 0) {
		$array[0] = $array[0] - $array[1];
	} else {
		echo array_sum($array);exit();
	}
}


<?
$root=trim(fgets(STDIN));
$k=explode(' ',trim(fgets(STDIN)));
$first=$k[0];
$second=$k[1];
function differ($a,$b){
    switch($a){
        case 'T': $a=10; break;
        case 'J': $a=11; break;
        case 'Q': $a=12; break;
        case 'K': $a=13; break;
        case 'A': $a=14; break;
    }
    switch($b){
        case 'T': $b=10; break;
        case 'J': $b=11; break;
        case 'Q': $b=12; break;
        case 'K': $b=13; break;
        case 'A': $b=14; break;
    }
    if($a>$b) return 1;
    else return 0;
}
if($first[1]==$root){
    if($second[1]==$root){
        if(differ($first[0],$second[0])) echo "YES";
            else echo "NO";
    }else{
        echo "YES";
    }
}else{
    if($second[1]==$root) echo "NO";
    else{
        if($first[1]==$second[1]){
            if(differ($first[0],$second[0])) echo "YES";
            else echo "NO";
        }else{
            echo "NO";
        }
    }
}
?>

<?
$fp=fopen('php://stdin', 'r');
$lines=stream_get_contents($fp);
$lines=trim($lines);
$lines=explode("\n", $lines);

$cards=array("6", "7", "8", "9", "T", "J", "Q", "K", "A");
$jok=trim($lines[0]);
list($first, $second)=explode(" ", trim($lines[1]));
$key_2=array_search($second{0}, $cards);    //10
$key_1=array_search($first{0}, $cards); //1
if($first{1}==$second{1})
    echo ($key_1>$key_2)?'YES':'NO';
else
    echo ($first{1}==$jok)?'YES':'NO';
?>

<?
$root=trim(fgets(STDIN));
$k=explode(' ',trim(fgets(STDIN)));
$first=$k[0];
$second=$k[1];
function differ($a,$b){
    switch($a){
        case 'T': $a=10; break;
        case 'J': $a=11; break;
        case 'Q': $a=12; break;
        case 'K': $a=13; break;
        case 'A': $a=14; break;
    }
    switch($b){
        case 'T': $a=10; break;
        case 'J': $a=11; break;
        case 'Q': $a=12; break;
        case 'K': $a=13; break;
        case 'A': $a=14; break;
    }
    if($a>$b) return 1;
}
if($first[1]==$root){
    if($second[1]==$root){
        if(differ($first[0],$second[0])) echo "YES";
            else echo "NO";
    }else{
        echo "YES";
    }
}else{
    if($second[1]==$root) echo "NO";
    else{
        if($first[1]==$second[1]){
            if(differ($first[0],$second[0])) echo "YES";
            else echo "NO";
        }else{
            echo "NO";
        }
    }
}
?>

<?
$fp=fopen('php://stdin', 'r');
$lines=stream_get_contents($fp);
$lines=trim($lines);
$lines=explode("\n", $lines);

$cards=array("6", "7", "8", "9", "T", "J", "Q", "K", "A");
$jok=trim($lines[0]);
list($first, $second)=explode(" ", trim($lines[1]));
$key_2=array_search($second{0}, $cards);
$key_1=array_search($first{0}, $cards);
echo (($first{1}==$second{1} and $key_1>$key_2) or $first{1}==$jok)?'YES':'NO';
?>


<?php

$fr = fopen("php://stdin", "r");
$fw = fopen("php://stdout", "w");

fscanf($fr, "%s", $str);

$a = substr($str, 0, 1);

$charPosition = strpos($str, 'e');

$d = substr($str, 2, $charPosition - 2);

$b =  substr($str, $charPosition + 1);

if (($dLen = strlen($d)) < $b) {
	$d .= str_repeat('0', $b - $dLen);
}

if ($a == '0' && $d == '0' && $b == '0') {
	$realNumber = 0;
} elseif ($b == '0') {
	$realNumber = $a . '.' . $d;
	$realNumber = removeLeadingZeroes($realNumber);
} else {
	$realNumber = $a . substr($d, 0, $b);

	if ($dLen > $b) {
		$realNumber .= '.';
	}

	$realNumber .= substr($d, $b);

	$realNumber = removeLeadingZeroes($realNumber);
}

function removeLeadingZeroes($realNumber)
{
	if (! strpos($realNumber, '.')) {
		return $realNumber;
	}

	for ($i = strlen($realNumber); $i> 0; $i--) {
		if ($realNumber[$i-1] != 0) {
			return $realNumber;
		}

		$realNumber = substr($realNumber, 0, $i-1);
	}

	return $realNumber;
}

fprintf($fw, $realNumber);

fclose($fr);
fclose($fw);

<?php
$a = str_split(trim(fgets(STDIN)));
for($x = 0; $x < count($a); $x++)
{
     if($a[$x] == ".")
     {
          $b = array_slice($a, 0, $x);
          $c = array_slice($a, $x + 1);
          break;
     }
}
for($x = 0; $x < count($c); $x++)
{
     if($c[$x] == "e")
     {
          $d = array_slice($c, 0, $x);
          $e = array_slice($c, $x + 1);
     }
}
$f = implode($e);
if(count($d) < $f)
{
     $g = $f - count($d);
     for($x = 1; $x <= $g; $x++)
     {
          array_push($d, 0);
     }
     $h = array_merge($b, $d);
     $i = count($h);
     for($x = 0; $x < $i; $x++)
     {
          if($h[$x] == 0)
          {
               unset($h[$x]);
          }
          else
          {
               break;
          }
     }
     print implode($h);
}
elseif(count($d) == $f)
{
     $g = array_merge($b, $d);
     $h = count($g);
     for($x = 0; $x < $h; $x++)
     {
          if($g[$x] == 0)
          {
               unset($g[$x]);
          }
          else
          {
               break;
          }
     }
     print implode($g);
}
elseif(count($d) > $f)
{
     $g = array_slice($d, 0, $f);
     $h = array_slice($d, $f);
     $i = array_merge($b, $g);
     $h2 = array_unique($h);
     sort($h2);
     if((count($h2) == 1) && ($h2[0] == 0))
     {
          $j = $i;
          if(count($j) == 1)
          {
               print implode($j);
          }
          else
          {
               $k = count($j);
               for($x = 0; $x < $k; $x++)
               {
                    if($j[$x] == 0)
                    {
                         unset($j[$x]);
                    }
                    else
                    {
                         break;
                    }
               }
               print implode($j);
          }
     }
     else
     {
          array_push($i, ".");
          $j = array_merge($i, $h);
          if($j[1] == ".")
          {
               print implode($j);
          }
          else
          {
               $k = count($j);
               for($x = 0; $x < $k; $x++)
               {
                    if($j[$x] == 0)
                    {
                         unset($j[$x]);
                    }
                    else
                    {
                         break;
                    }
               }
               print implode($j);
          }
     }
}
?>

<?php
$a = str_split(trim(fgets(STDIN)));
for($x = 0; $x < count($a); $x++)
{
     if($a[$x] == ".")
     {
          $b = array_slice($a, 0, $x);
          $c = array_slice($a, $x + 1);
          break;
     }
}
for($x = 0; $x < count($c); $x++)
{
     if($c[$x] == "e")
     {
          $d = array_slice($c, 0, $x);
          $e = array_slice($c, $x + 1);
     }
}
$f = implode($e);
if(implode($a) == "0.0e0")
{
     print "0";
}
elseif(count($d) < $f)
{
     $g = $f - count($d);
     for($x = 1; $x <= $g; $x++)
     {
          array_push($d, 0);
     }
     $h = array_merge($b, $d);
     $i = count($h);
     for($x = 0; $x < $i; $x++)
     {
          if($h[$x] == 0)
          {
               unset($h[$x]);
          }
          else
          {
               break;
          }
     }
     print implode($h);
}
elseif(count($d) == $f)
{
     $g = array_merge($b, $d);
     $h = count($g);
     for($x = 0; $x < $h; $x++)
     {
          if($g[$x] == 0)
          {
               unset($g[$x]);
          }
          else
          {
               break;
          }
     }
     print implode($g);
}
elseif(count($d) > $f)
{
     $g = array_slice($d, 0, $f);
     $h = array_slice($d, $f);
     $i = array_merge($b, $g);
     array_push($i, ".");
     $j = array_merge($i, $h);
     if($j[1] == ".")
     {
          print implode($j);
     }
     else
     {
          $k = count($j);
          for($x = 0; $x < $k; $x++)
          {
               if($j[$x] == 0)
               {
                    unset($j[$x]);
               }
               else
               {
                    break;
               }
          }
          print implode($j);
     }
}
?>

<?php
$a = str_split(trim(fgets(STDIN)));
for($x = 0; $x < count($a); $x++)
{
     if($a[$x] == ".")
     {
          $b = array_slice($a, 0, $x);
          $c = array_slice($a, $x + 1);
          break;
     }
}
for($x = 0; $x < count($c); $x++)
{
     if($c[$x] == "e")
     {
          $d = array_slice($c, 0, $x);
          $e = array_slice($c, $x + 1);
     }
}
$f = implode($e);
if(count($d) < $f)
{
     $g = $f - count($d);
     for($x = 1; $x <= $g; $x++)
     {
          array_push($d, 0);
     }
     $h = array_merge($b, $d);
     $i = count($h);
     for($x = 0; $x < $i; $x++)
     {
          if($h[$x] == 0)
          {
               unset($h[$x]);
          }
          else
          {
               break;
          }
     }
     print implode($h);
}
elseif(count($d) == $f)
{
     $g = array_merge($b, $d);
     $h = count($g);
     for($x = 0; $x < $h; $x++)
     {
          if($g[$x] == 0)
          {
               unset($g[$x]);
          }
          else
          {
               break;
          }
     }
     print implode($g);
}
elseif(count($d) > $f)
{
     $g = array_slice($d, 0, $f);
     $h = array_slice($d, $f);
     $i = array_merge($b, $g);
     array_push($i, ".");
     $j = array_merge($i, $h);
     if($j[1] == ".")
     {
          print implode($j);
     }
     else
     {
          $k = count($j);
          for($x = 0; $x < $k; $x++)
          {
               if($j[$x] == 0)
               {
                    unset($j[$x]);
               }
               else
               {
                    break;
               }
          }
          print implode($j);
     }
}
?>

<?php

$fr = fopen("php://stdin", "r");
$fw = fopen("php://stdout", "w");

fscanf($fr, "%s", $str);

$charPosition = strpos($str, 'e');

$number = substr($str, 0, $charPosition);

$exp =  substr($str, $charPosition + 1);

$realNumber = $number * pow(10, $exp);

fprintf($fw, $realNumber);

fclose($fr);
fclose($fw);

<?php

$fr = fopen("php://stdin", "r");
$fw = fopen("php://stdout", "w");

fscanf($fr, "%s", $str);

$a = substr($str, 0, 1);

$charPosition = strpos($str, 'e');

$d = substr($str, 2, $charPosition - 2);

$b =  substr($str, $charPosition + 1);

if ($b == '0') {
	$realNumber = $a . '.' . $d;
	$realNumber = removeLeadingZeroes($realNumber);
} else {
	$realNumber = $a . substr($d, 0, $b);
	$realNumber .= '.';
	$realNumber .= substr($d, $b);

	$realNumber = removeLeadingZeroes($realNumber);
}

function removeLeadingZeroes($realNumber)
{
	if (! strpos($realNumber, '.')) {
		return $realNumber;
	}

	for ($i = strlen($realNumber); $i> 0; $i--) {
		if ($realNumber[$i-1] != 0) {
			return $realNumber;
		}

		$realNumber = substr($realNumber, 0, $i-1);
	}

	return $realNumber;
}

fprintf($fw, $realNumber);

fclose($fr);
fclose($fw);


<?php

/**
 * @author Sunwarul
 */

list($n, $t) = explode(' ', fgets(STDIN));
$str         = trim(fgets(STDIN));
$arr         = str_split($str);
$t           = intval($t);

while ($t--) {
    for ($i = 1; $i < count($arr); ++$i) {
        if ($arr[$i] == 'G' && $arr[$i - 1] == 'B') {
            $arr[$i]     = 'B';
            $arr[$i - 1] = 'G';
            ++$i;
        }
    }
}

$res = implode('', $arr);
echo $res."\n";

<?php
//266B: Queue at the School
list($n, $t) = explode(" ", trim(fgets(STDIN))); //$n = 4; $t = 1;
$queue = trim(fgets(STDIN)); //$queue = "GGGB";
for ($i = 0; $i < $t; $i++) {
    $explode = explode("BG", $queue);
    $queue = implode("GB", $explode);
}
echo $queue;
?>

<?php
	list($n,$t) = explode(' ',trim(fgets(STDIN)));
	$var = trim(fgets(STDIN));
	for ($x=0;$x<$t;$x++) {
		$var = str_split($var);
		for($y=0;$y<count($var)-1;$y++) {
			if ($var[$y] == 'B' && $var[$y+1] == 'G') {
				$var[$y] = 'X';
				$var[$y+1] = 'Y';
			}
		}
		$var = implode('',$var);
		$var = str_replace('XY','GB',$var);
	}
	echo $var;

<?php
$input = trim(fgets(STDIN));
$string = trim(fgets(STDIN));

$arr_input = explode(" ",$input);

$jumlah = $arr_input[0];
$detik = $arr_input[1];

$arr_string = str_split($string);
for($x=0;$x<$detik;$x++)
{
	for($i=0;$i<(count($arr_string)-1);$i++)
	{
		$j = $i + 1;
		if($arr_string[$i] == "B" && $arr_string[$j] == "G")
		{
			$arr_string[$j] = "B";
			$arr_string[$i] = "G";
			$i++;
		}
	}
}
echo implode($arr_string);
?>

<?php
function input()
{
    while (($line = fgets(STDIN)) != PHP_EOL) {
        yield $line;
    }
}

function put($r)
{
    echo $r;
}

$COUNT = 0;
foreach (input() as $line) {
    if ($COUNT == 0) {
        list($n, $s) = explode(' ', $line);
        ++$COUNT;
        continue;
    }
    $q = $line;

    for($i = 0; $i<$s; ++$i) {
        for($j = strlen($q)-1; $j>0; --$j) {
            if ( $q[$j] == 'G' && $q[$j-1] == 'B') {
                $z = $q[$j-1];
                $q[$j-1] = $q[$j];
                $q[$j] = $z;
                --$j;

            }

        }
    }

    put($q);

    if (++$COUNT > 1) {
        break;
    }

}

<?php
function input()
{
    while (($line = fgets(STDIN)) != PHP_EOL) {
        yield $line;
    }
}

$COUNT = 0;
foreach (input() as $line) {
    if ($COUNT == 0) {
        list($n, $s) = explode(' ', $line);
        ++$COUNT;
        continue;
    }
    $q = $line;

    for($i = 0; $i<$s; ++$i) {
        for($j = strlen($q)-1; $j>0; --$j) {
            if ( $q[$j] == 'G' && $q[$j-1] == 'B') {
                $z = $q[$j-1];
                $q[$j-1] = $q[$j];
                $q[$j] = $z;
                --$j;
            }

        }
    }

    echo $q;

    if (++$COUNT > 1) {
        break;
    }

}

<?php

function dd(...$args)
{
    var_dump(...$args);
    die;
}

define('TXTIN', fopen('input.txt', 'r'));
define('TXTOUT', fopen('output.txt', 'w'));

//$input = TXTIN;
$input = STDIN;
//$output = TXTOUT;
$output = STDOUT;

list($n, $t) = fscanf($input, "%d %d\n");

list($s) = fscanf($input, "%s");

for ($i = 0; $i < $t; $i++) {
    for ($j = 0; $j < $n - 1; $j++) {
        if ($s[$j + 1] === 'G' && $s[$j] === 'B') {
            $s[$j] = 'G';
            $s[$j + 1] = 'B';
            $j++;
        }
    }
}

fwrite($output, $s);

<?php

$nt = array_map('intval', explode(' ', readline()));
$queue = str_split(readline());
$t = 0;
while($t < $nt[1]){
    $i = 0;
    while($i < $nt[0] -1){
        if($queue[$i] == 'B' && $queue[$i+1] == 'G'){
            $queue[$i] = 'G';
            $queue[$i+1] = 'B';
            $i = $i +2;
        }else{
            $i++;
        }
    }
    $t ++;
}

echo implode('', $queue);

<?php
$n = explode(" ",trim(fgets(STDIN)));
$line = str_split(trim(fgets(STDIN)),1);
for ($i=0;$i<$n[1];$i++)
{
    for ($j=1;$j<$n[0];$j++)
    {
        if (($line[$j]=="G")&&($line[$j])!=$line[$j-1])
        {
            $t=$line[$j];$line[$j]=$line[$j-1];$line[$j-1]=$t;$j++;
        }
    }
}
foreach ($line as $char)echo $char;

<?php
$n=trim(fgets(STDIN));
$n=explode(' ',$n);
$input=trim(fgets(STDIN));
$array=str_split($input);
$a=$n[1];
while($a>=1){
foreach ($array as $key => $value) {
   if(key_exists($key+1,$array)){
      if($value == 'B' and $array[$key+1] == 'G'){
      $x=$array[$key];
      $array[$key]=$array[$key+1];
      $array[$key+1]=$x;
      }
   }
}
$a--;
}
echo join('',$array);

<?php

$f = fopen('php://stdin', 'r');
//$f = fopen('5.txt', 'r');
$a = explode(" ",trim(fgets($f)));
$och = trim(fgets($f));

$t = $a[1];
$n = $a[0];

for($i=0;$i<$t;$i++){
    $och = str_replace("BG","GB",$och);
}

echo $och;

<?php
// 266B 	Очередь в школе

$in = fopen("php://stdin", 'r');

$input_line = fgets($in);
list($n, $t) = preg_split('/ /', substr($input_line, 0, strlen($input_line)-2), -1, PREG_SPLIT_NO_EMPTY);
$n = (int) $n;
$t = (int) $t;

$input_line = fgets($in);
$arr = preg_split('//', substr($input_line, 0, strlen($input_line)-2), -1, PREG_SPLIT_NO_EMPTY);

for ($i=1; $i <= $t; $i++) {
    for ($j=0; $j < $n; $j++) {
        if (($arr[$j] == 'B') and ($arr[$j+1]) == 'G') {
            $arr[$j] = 'G';
            $arr[$j+1] = 'B';
            $j++;
         }
    }
}

$out = '';
foreach ($arr as $key => $value) {
    $out .= $value;
}

echo $out;

?>

<?php

//  In the name of Allah, the most Gracious, the most Merciful

//  Copyright(c) 2009-2013, all rights reserved.
//  written by ZHUMAZHANOV ADLET.

fscanf(STDIN, "%d %d", $n, $t);
fscanf(STDIN, "%s", $q);

for ($ti = 0; $ti < $t; $ti ++) {
	$length = strlen($q);
	for ($i = 0; $i < $length; $i ++) {
		if ($q[$i] == "G") continue;
		if ($i + 1 < $length && $q[$i+1] == "G") {
			$buf = $q[$i];
			$q[$i] = $q[$i+1];
			$q[$i+1] = $buf;
			$i ++;
		}
	}
}

printf("%s", $q);

?>

<?php
$input = trim(fgets($STDIN));
$string = trim(fgets($STDIN));

$arr_input = explode(" ",$input);

$jumlah = $arr_input[0];
$detik = $arr_input[1];

$arr_string = str_split($string);
for($x=0;$x<$detik;$x++)
{
	for($i=0;$i<(count($arr_string)-1);$i++)
	{
		$j = $i + 1;
		if($arr_string[$i] == "B" && $arr_string[$j] == "G")
		{
			$arr_string[$j] = "B";
			$arr_string[$i] = "G";
			$i++;
		}
	}
}
echo implode($arr_string);
?>

<?php
function input()
{
    while (($line = fgets(STDIN)) != PHP_EOL) {
        yield $line;
    }
}

function put($r)
{
    echo $r . PHP_EOL;
}

$COUNT = 0;
foreach (input() as $line) {
    if ($COUNT == 0) {
        list($n, $s) = explode(' ', $line);
        ++$COUNT;
        continue;
    }
    $q = $line;

    for($i = 0; $i<$s; ++$i) {
        for($j = strlen($q)-1; $j>0; --$j) {
            if ( $q[$j] == 'G' && $q[$j-1] == 'B') {
                $z = $q[$j-1];
                $q[$j-1] = $q[$j];
                $q[$j] = $z;
            }
        }
    }

    put($q);

    if (++$COUNT > 1) {
        break;
    }

}

<?php
$n=trim(fgets(STDIN));
$t=trim(fgets(STDIN));
$s=trim(fgets(STDIN));

$arr=str_split($s);
$n=$n-1;
$temp1="";
$temp2="";
$j=0;
$baru;

while ( $j < $t) {
	while ($n >= 0) {
		$temp1=$arr[$n];
		$m=$n-1;
		$temp2=$arr[$m];
		if ($temp2 != $temp1) {
			$arr[$m] = $temp1;
			$arr[$n] = $temp2;
		}
		$n--;
	}
	$j++;
}
echo $arr;
?>

<?php
	list($n,$t) = explode(' ',trim(fgets(STDIN)));
	$var = str_split(trim(fgets(STDIN)));
	for ($x=0;$x<$t;$x++) {
		for($y=0;$y<count($var);$y++) {
			if ($var[$y] == 'B' && $var[$y+1] == 'G') {
				$var[$y] = 'G';
				$var[$y+1] = 'B';
			}
		}
	}
	echo implode('',$var);

<?php
	list($n,$t) = explode(' ',trim(fgets(STDIN)));
	$var = str_split(trim(fgets(STDIN)));
	for ($x=0;$x<$t;$x++) {
		for($y=0;$y<count($var);$y++) {
			if ($var[$y] == 'B' && $var[$y+1] == 'G') {
				$var[$y] = 'X';
				$var[$y+1] = 'X';
			}
		}
	}
	$var = implode('',$var);
	$var = str_replace('XX','GB',$var);
	echo $var;

<?php
	list($n,$t) = explode(' ',trim(fgets(STDIN)));
	$var = str_split(trim(fgets(STDIN)));
	for ($x=0;$x<$t;$x++) {
		for($y=count($var)-1;$y>0;$y--) {
			if ($var[$y] == 'G' && $var[$y-1] == 'B') {
				$var[$y] = 'B';
				$var[$y-1] = 'G';
			}
		}
	}
	echo implode('',$var);

<?php
	list($n,$t) = explode(fgets(STDIN));
	$var = str_split(fgets(STDIN));
	for ($x=0;$x<$t;$x++) {
		for($y=count($var)-1;$y>0;$y--) {
			if ($var[$y] == 'G' && $var[$y-1] == 'B') {
				$var[$y] = 'B';
				$var[$y-1] = 'G';
			}
		}
	}
	echo implode('',$var);


<?php
$n=(int)readline();
$s=readline();
$arr=explode(' ',$s);
$i=0;
$r=0;
while($i!=$n){
    if($arr[$i]==1){
        $r=1;
        break;
    }
    else{
        $i++;
    }
}
if($r==1)
echo "HARD";
else{
    echo "EASY";
}

<?php
$n = readline();
$a = explode(' ', readline());
if (in_array('1', $a)) {
  echo "HARD\n";
}
else {
  echo "EASY\n";
}

<?php
$n = trim(fgets(STDIN));

$i = trim(fgets(STDIN));

$arr = explode(' ', $i);
$par = 0;

foreach ($arr as $value) {
  if($value == 1){
    echo 'HARD';
    break;
  }else{
    $par = 1 + $par;
  }
}

if($par == $n){
  echo 'EASY';
}

 ?>

<?php
/* $inputs = [];
foreach($data as $k => $d) {
    echo $k;
    $inputs = array_merge($inputs, $data[$k]);
} */

$stdin = fopen('php://stdin', 'r');
while($line = fgets($stdin)) {
    $line = explode(" ", $line);
    $data[] = $line;
}
fclose($stdin);

list($n, $i) = $data;

if (in_array(1, $i)) {
    echo "HARD";
} else {
    echo "EASY";
}

<?php
/* $inputs = [];
foreach($data as $k => $d) {
    echo $k;
    $inputs = array_merge($inputs, $data[$k]);
} */

// // // STANDARD INPUT DEFINITION // // //
$stdin = fopen('php://stdin', 'r');
while($line = fgets($stdin)) {
    $data[] = explode(" ", $line);
}
fclose($stdin);

// // // DEFINE VARIABLES HERE (1 input line = 1 variable) // // //
list($a, $b) = $data;

// // // START CODING LOGIC HERE // // //
if (in_array(1, $b)) {
    echo "HARD";
} else {
    echo "EASY";
}

<?php
fscanf(STDIN,"%d",$n);
$a=explode(' ',trim(fgets(STDIN)));
foreach($a as $i)
{
    if($i==1)
    {
        echo "HARD";
        return 0;
    }
}
echo "EASY";
?>

<?php
fscanf(STDIN,"%d",$n);
$line=trim(fgets(STDIN));
$singleValue=explode(" ", $line);
$count=0;
for($i=0;$i<$n;$i++)
{
	if($singleValue[$i]==1)
	{
		echo "HARD";
		$count=1;
		break;

	}

}
if($count==0)
echo "EASY";

<?php

$n = trim(fgets(STDIN));

$responses = explode(" ", trim(fgets(STDIN)));

foreach($responses as $resp){
    if($resp==1){
        print("HARD");
        return;
    }
}

print("EASY");

<?php
$x = readline();
$y = readline();
$cndtn = 1;
for($i=0; $i < strlen($y); $i++)
	if($y[$i] == '1')
	{
		echo "HARD\n";
		$cndtn = 0;
		break;
	}
if($cndtn == 1)
	echo "EASY\n";

<?php
    $n=trim(fgets(STDIN));
    $a=explode(' ',trim(fgets(STDIN)));
    for($i=0;$i<$n;$i++){
        $s+=$a[$i];
    }
    if($s>0) echo 'HARD';
    else echo 'EASY';

<?php
error_reporting(0);
$handle = fopen("php://stdin", "r");
$data = explode("\n", stream_get_contents(fopen("php://stdin", "r")));
$input = [];

foreach ($data as $index => $line) {
    if (strlen($line) > 0) {
        $input[$index] = explode(" ", trim($line));
    }
}

echo in_array("1", $input[1], false) ? 'HARD': 'EASY';

<?php
fscanf(STDIN, "%d", $n);
$a = explode(" ", trim(fgets(STDIN)));
if (in_array(1, $a))
    echo "HARD";
else
    echo "EASY";
?>

<?php
error_reporting(0);
$n=readline();
$k=explode(' ',readline());
if(in_array('1',$k))
{
    echo 'HARD';
}
else
{
    echo 'EASY';
}
?>

<?php
$n = fgets(STDIN);
$input = explode(" ", fgets(STDIN));

for ($i = 0; $i < $n; $i++) {
  if ($input[$i] == 1) {
    echo "hard";
    exit();
  }
}

echo "easy";

?>

<?php
	$n = readline();
	$answers = explode(' ', readline());
	$check = 1;

	for ($i = 0; $i < $n; $i++) {
	    if ($answers[$i] == 0) {
	        $check *= 1;
	    } else {
	        $check *= 0;
	    }
	}

	if ($check) {
	    echo 'easy';
	} else {
	    echo 'hard';
	}
?>

<?php
    fscanf(STDIN, "%d", $n);
    $k = 0;
    $arr = explode(" ", trim(fgets(STDIN)));
        for ($i = 0; $i < $n; $i++){
            if ($arr[$i] == 1){
                $k++;
            }
        }
        if ($k > 0){
            echo 'HARD';
        }
        else echo 'EASY';

<?php

$a = trim(fgets(STDIN));
$b = explode(" ",  trim(fgets(STDIN)));
$c = "easy";

foreach ($b as $value) {
	if ($value == 1) {
		$c = "HARD";
		break;
	}
}
echo $c;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

class stdIn{var $ntxt = 0;var $nline = 0;var $arr_txt;var $arr_line;var $linex;var $liney;
    function stdIn($local = false){if($local){$dir = fopen("input.txt", 'r');}else{$dir = fopen("php://stdin", 'r');}
        $datatxt = stream_get_contents($dir);$del = Array("\n","\r","\n\r");$data = explode("\n",$datatxt);	$il = 0;$id = 0;
        foreach($data as $line){if(strlen($line) > 0){$line = str_replace($del,'',$line);$dataex[] = $line;$text = explode(" ",$line);
            foreach($text as $txt){$arr_txt[] = $txt;$this->linex[$id] = $il;$this->liney[$il] = $id;$id++;}}$il++;}$this->arr_line = $dataex;$this->arr_txt  = $arr_txt;}
    function G(){$ret = $this->arr_txt[$this->ntxt++];$this->nline = $this->linex[$this->ntxt];return $ret;}
    function GL(){$this->ntxt = $this->liney[$this->nline]+1;return $this->arr_line[$this->nline++];}} /*init*/

$inp = new stdIn(false);
$n = $inp->arr_line[0];
$a = explode(' ',$inp->arr_line[1]);
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
error_reporting(0);
$a = readline();
$b=explode(" ",readline());
$one =array_count_values($b);
if ($one[1] != 0)
{
	echo "Hard";
}
else
{
	echo "Easy";
}
?>

<?php
$a = trim(fgets(STDIN));
$b = explode(" ", trim(fgets(STDIN)));
$c = array_sum($b);
if($c == 0)
{
     print "EASY";
}
else
{
     print "HARD";
}
?>

<?php
ini_set('error_reporting', E_ALL & ~E_NOTICE);

fscanf(STDIN, "%d", $n);
$a = explode(" ", trim(fgets(STDIN)));

echo array_sum($a) > 0 ? "HARD" : "EASY";

<?php
    fgets(STDIN);
    $a = explode(" ", trim(fgets(STDIN)));
    print(in_array("1",$a)?"HARD":"EASY");
?>

<?php
    function getData () {
        return file('php://stdin', FILE_IGNORE_NEW_LINES);
    }
    $result = 'EASY';
    $data = getData();
    $person = $data[0];
    $personAns = explode(' ', $data[1]);
    foreach ($personAns as $value) {
        if ((int)$value === 1) {
            $result = 'HARD';
            break;
        }
    }
    echo $result;
?>

<?php
$n = trim(fgets(STDIN));
$opinions = trim(fgets(STDIN));
$opinions = explode(' ', $opinions);

if ( in_array(1, $opinions) ) {
    echo "HARD\n";
} else {
    echo "EASY\n";
}

<?php
$w=intval(fgets(STDIN));
$ar=explode(' ',fgets(STDIN));
$i = 0;
$res = "EASY";
while ($i<$w) {
    if($ar[$i] > 0){
        $res = "HARD";
    break;
    }
    $i++;
}
echo $res;
?>

<?php

$count = trim(fgets(STDIN));
$array = explode(' ', trim(fgets(STDIN)));

for ($i = 0; $i < $count; $i++) {
    if ($array[$i] != 0) {
        echo "HARD";die();
    }
}
echo "EASY";

<?php

   $p = fgets(STDIN);
   $o = explode(' ', fgets(STDIN));

   fwrite(STDOUT, array_sum($o) > 0 ? 'HARD' : 'EASY');

<?php

function search($str) {
  // code goes here
  return (strpos("0".$str, '1')) ? 'HARD' : 'EASY' ;
}

// keep this function call here
$file = fopen('php://stdin', 'r');
// $file = fopen('input.txt', 'r');
$num = fgets($file);
$str = fgets($file);
echo search($str);
?>

<?php
$x = readline();
$y = readline();
for($i=0; $i < strlen($y); $i++)
	if($y[$i] == '1')
    	die("HARD\n");
die("EASY\n");

<?php
$w=intval(fgets(STDIN));
$st=fgets(STDIN);
$res = strstr($st, "1") ? "HARD" : "EASY";
echo $res;
?>

<?php

$input = STDIN;
$output = STDOUT;

fgets($input);

$ni = explode(' ', fgets($input));

fwrite($output, in_array(1, $ni) ? 'HARD' : 'EASY');

<?php
while(! feof(STDIN)){
   $var[]=fgets(STDIN);
}

$value = explode(" ", $var[1]);

$f=0;
for($i=0; $i < $var[0]; $i++){
    if($value[$i]==1 && $f!=1){echo "hard"; $f=1;}
}
if($f!=1)
echo "easy";

fclose(STDIN);

?>

<?php
    $n = trim(fgets(STDIN));
    $answers = explode(' ', trim(fgets(STDIN)));
    $isHard = false;
    foreach ($answers as $answer) {
        if ($answer == "1") {
            $isHard = true;
        }
    }
    echo $isHard ? "HARD" : "EASY";

<?php
    fscanf(STDIN, "%d", $n);
    $k = 0;
    $arr = explode(" ", trim(fgets(STDIN)));
        for ($i = 0; $i < $n; $i++){
            if ($arr[$i] == 1){
                $k++;
            }
        }
        if ($k > 0){
            echo 'HARD';
        }
        else echo 'YASY';

<?php
$w=intval(fgets(STDIN));
$st=fgets(STDIN);
$res = strpos($st, "1") ? "HARD" : "EASY";
echo $res;
?>

<?php
$w=intval(fgets(STDIN));
$st=fgets(STDIN);
if(strstr('1', $st)){
    $res = "HARD";
}else{
    $res = "EASY";
}
echo $res;
?>

<?php
$w=intval(fgets(STDIN));
$st=fgets(STDIN);
$res = strpos($st, "1") ? "HARD" : "EASY";
echo $res;
die;
?>

<?php
$w=intval(fgets(STDIN));
$ar=explode(' ',fgets(STDIN));
$i = 0;
$res = "EAZY";
while ($i<$w) {
    if($ar[$i] > 0){
        $res = "HARD";
    break;
    }
    $i++;
}
echo $res;
?>

<?php
while(! feof(STDIN)){
   $var[]=fgets(STDIN);
}

$value = explode(" ", $var[1]);

$f=0;
for($i=0; $i < $var[0]; $i++){
    if($value[$i]==1){echo "hard"; $f=1;}
}
if($f!=1)
echo "easy";

fclose(STDIN);

?>

n = int(input())
a = sum(map(int, input().split()))
if a > 0:
    print('HARD')
else:
    print('EASY')

<?php
/* $inputs = [];
foreach($data as $k => $d) {
    echo $k;
    $inputs = array_merge($inputs, $data[$k]);
} */

$stdin = fopen(STDIN, 'r');
while($line = fgets($stdin)) {
    $line = explode(" ", $line);
    $data[] = $line;
}
fclose($stdin);

print_r($data);

list($n, $i) = $data;

if (in_array(1, $i)) {
    echo "HARD";
} else {
    echo "EASY";
}

<?php
/* $inputs = [];
foreach($data as $k => $d) {
    echo $k;
    $inputs = array_merge($inputs, $data[$k]);
} */

$stdin = fopen('php://stdin', 'r');
while($line = fgets($stdin)) {
    $line = explode(" ", $line);
    $data[] = $line;
}
fclose($stdin);

print_r($data);

list($n, $i) = $data;

if (in_array(1, $i)) {
    echo "HARD";
} else {
    echo "EASY";
}

<?php

// $stdin = fopen("data/file.txt", 'r');
$stdin = file(STDIN);
// $stdin = file("data/file.txt");

foreach($stdin as $line) {
    $data[] = explode(" ", trim($line));
}

print_r($data);
list($n, $i) = $data;

if (in_array("1", $i)) {
    echo "HARD";
} else {
    echo "EASY";
}

<?php
    $n=trim(fgets(STDIN));
    for($i=0;$i<$n;$i++)$s+=(fgets(STDIN));
    if($s>0) echo 'HARD';
    else echo 'EASY';

<?php
    $a=trim(fgets(STDIN));
    $b=trim(fgets(STDIN));
    $c=trim(fgets(STDIN));
    if($a+$b+$c>0) echo 'HARD';
    else echo 'EASY';

<?php
    $n=trim(fgets(STDIN));
    for($i=0;$i<$n;$i++){
        $s+=fgets(STDIN);
    }
    if($s>0) echo 'HARD';
    else echo 'EASY';

<?php
    $n=trim(fgets(STDIN));
    for($i=0;$i<$n;$i++){
        $s+=trim(fgets(STDIN));
    }
    if($s>0) echo 'HARD';
    else echo 'EASY';

<?php
$handle = fopen ("php://stdin", "r");
// $line = explode(" ", trim(fgets($handle)));
$line = trim(fgets($handle));
fclose($handle);

$handle = fopen ("php://stdin", "r");
$line2 = explode(" ", trim(fgets($handle)));
fclose($handle);

echo in_array("1", $line2) ? 'HARD': 'EASY';

<?php
$handle = fopen ("php://stdin", "r");
// $line = explode(" ", trim(fgets($handle)));
$line = trim(fgets($handle));
fclose($handle);

$handle = fopen ("php://stdin", "r");
$line2 = explode(" ", trim(fgets($handle)));
fclose($handle);

echo in_array("1", $line2, false) ? 'HARD': 'EASY';

<?php
	$n = readline();
	$answers = explode(' ', readline());
	$check = 1;

	for ($i = 0; $i < $n; $i++) {
	    if ($answers[$i] == 0) {
	        $check *= 1;
	    } else {
	        $check *= 0;
	    }
	}

	if ($check) {
	    echo 'ease';
	} else {
	    echo 'hard';
	}
?>

<?php

$a = trim(fgets(STDIN));
$b = explode(" ",  trim(fgets(STDIN)));
$c = "easy";

foreach ($variable as $value) {
	if ($value == 1) {
		$c = "HARD";
		break;
	}
}
echo $c;

<?php

$a = trim(fgets(STDIN));
$b = explode(" ",  trim(fgets(STDIN)));
$c = "HARD";

foreach ($variable as $value) {
	if ($value == 0) {
		$c = "easy";
		break;
	}
}
echo $c;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =trim(fgets(STDIN));
var_dump($_POST);
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =fgets("php://input");
echo $str;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =file_get_contents("php://input");
echo $str;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =trim(fgets(STDIN));
echo $str;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =trim(fgets(STDIN));
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =trim(fgets(STDIN));
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        echo "HARD";
        die;
    }
}
echo "EASY";

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =fopen("php://stdin", 'r');
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =STDIN;
echo $str;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */
$str = fopen( 'php://stdin', 'r' );
// =trim(fgets(STDIN));
echo $str;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

//$str =trim(fgets(STDIN));
$str = "3
0 0 1";
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */
list($n, $k) = explode(' ', trim(fgets(STDIN)));
// =trim(fgets(STDIN));
echo $k;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =trim(file_get_contents (STDIN));
echo $str;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
/**
 * Created by PhpStorm.
 * User: Vitaly
 * Date: 22.01.2019
 * Time: 0:00
 */

$str =fopen("php://stdin", 'r');
echo $str;
$n = substr($str,0,1);
$a = explode(' ', substr($str,2));
$bool = "easy";
for($i=0;$i<$n;$i++){
    if(strval($a[$i])=="1"){
        $bool = "hard";
    }
}
echo $bool;

<?php
    function getData () {
        return file(__DIR__ . '/input.txt', FILE_IGNORE_NEW_LINES);
    }
    $result = 'EASY';
    $data = getData();
    $person = $data[0];
    $personAns = explode(' ', $data[1]);
    foreach ($personAns as $value) {
        if ($value == 1) {
            $result = 'HARD';
            break;
        }
    }
    echo '<br/>' . $result;
?>

<?php
    function getData () {
        return file(__DIR__ . '/input.txt', FILE_IGNORE_NEW_LINES);
    }
    $result = 'EASY';
    $data = getData();
    $person = $data[0];
    $personAns = explode(' ', $data[1]);
    foreach ($personAns as $value) {
        if ($value == 1) {
            $result = 'HARD';
            break;
        }
    }
    echo $result;
?>

<?php
    function getCountPersons () {
        return fgets(STDIN);
    }
    function getPersonAnwers () {
        return explode(' ', fgets(STDIN));
    }
    $result = 'EASY';
    $person = getCountPersons();
    $personAns = getPersonAnwers();
    foreach ($personAns as $value) {
        if ($value === 1) {
            $result = 'HARD';
            print $result;
            break;
        }
    }

<?php
    function getData () {
        return file_get_contents('php://stdin', FILE_IGNORE_NEW_LINES);
    }
    $result = 'EASY';
    $data = getData();
    $person = $data[0];
    $personAns = explode(' ', $data[1]);
    foreach ($personAns as $value) {
        if ($value == 1) {
            $result = 'HARD';
            break;
        }
    }
    echo $result;
?>

<?php
    function getData () {
        return file_get_contents('php://stdin', FILE_IGNORE_NEW_LINES);
    }
    $result = 'EASY';
    $data = getData();
    $person = $data[0];
    $personAns = explode(' ', $data[1]);
    foreach ($personAns as $value) {
        if ($value === 1) {
            $result = 'HARD';
            break;
        }
    }
    echo $result;
?>

<?php
    function getData () {
        return file('php://stdin', FILE_IGNORE_NEW_LINES);
    }
    $result = 'EASY';
    $data = getData();
    $person = $data[0];
    $personAns = explode(' ', $data[1]);
    var_dump($personAns);
    foreach ($personAns as $value) {
        if ((int)$value === 1) {
            $result = 'HARD';
            break;
        }
    }
    echo $result;
?>

<?php

$count = trim(fgets(STDIN));
$array = explode(' ', trim(fgets(STDIN)));

for ($i = 0; $i < $count; $i++) {
    if ($array[$i] !== 0) {
        echo "HARD";die();
    }
}
echo "EASY";

<?php

function search($str) {
  // code goes here
  return (strpos($str, '1')) ? 'HARD' : 'EASY' ;
}

// keep this function call here
$file = fopen('php://stdin', 'r');
// $file = fopen('input.txt', 'r');
$num = fgets($file);
$str = fgets($file);
echo search($str);
?>


<?php

###### IO ######
error_reporting(E_ALL);
#error_reporting(0);

function readString($f) {
	$r = array(
		"\r" => '',
		"\n" => '',
	);
	return strtr(fgets($f), $r);
}

function readNumString($f) {
	return trim(fgets($f));
}

function stringToArray($str) {
	return str_split($str);
}

function readNum($f, $is_int = false) {
	$v = readNumString($f);
	return $is_int ? intval($v) : floatval($v);
}

function readStringExplode($f, $delimiter = ' ') {
	$v = readNumString($f);
	if ($delimiter == '') {
		$return = stringToArray($v);
	} else {
		$return = explode($delimiter, $v);
	}
	$callf = 'trim';
	return array_map($callf, $return);
}

function readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {
	$v = readNumString($f);
	if ($delimiter == '') {
		$return = stringToArray($v);
	} else {
		$return = explode($delimiter, $v);
	}
	$callf = $is_int ? 'intval' : 'floatval';
	return array_map($callf, $return);
}

function readNumArray($f) {
	return readStringExplodeNum($f, ' ', true);
}

function readArray($f) {
	return readStringExplodeNum($f, ' ');
}

function readTrimString($f) {
	return trim(readString($f));
}

###### /IO ######
# for($i=0;$i<$n;$i++)

function getAnswer($is_test = false, $f = false) {
	if ($is_test === false) {
		$f = STDIN;
	}
	/* begin body */
	$first = readString($f);
	$second = readString($f);

	$dayCount = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
	$days = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday');
	$firstIndex = array_search($first, $days);
	for ($m = 0; $m < 11; $m++) {
		$diff = $dayCount[$m] % 7;
		$next = ($firstIndex + $diff) % 7;
		if ($second == $days[$next]) {
			echo 'YES';
			return;
		}
	}
	echo 'NO';
	/* / end body */
}

if (empty($is_test))
	getAnswer();

<?php
$a = trim(fgets(STDIN));
$b = trim(fgets(STDIN));
if((($a == "monday") && ($b == "tuesday")) || (($a == "tuesday") && ($b == "wednesday")) || (($a == "wednesday") && ($b == "thursday")) || (($a == "thursday") && ($b == "friday")) || (($a == "friday") && ($b == "saturday")) || (($a == "saturday") && ($b == "sunday")) || (($a == "sunday") && ($b == "monday")))
{
     print "NO";
}
else
{
     print "YES";
}
?>


<?php
$a = trim(fgets(STDIN));
$b = range(1, $a);
$b = array_merge($b, $b);
$b = array_merge($b, $b);
$c = array();
$d = array();
$e = 0;
for($x = 1; $x <= 64; $x++)
{
    $c = array_merge($c, $b);
}
for($x = 0; $x < count($c); $x++)
{
    $e += $x;
    if($c[$e] == "")
    {
        break;
    }
    else
    {
        $d[$x] = $c[$e];
    }
}
$f = array_unique($d);
if(count($f) == $a)
{
    print "YES";
}
else
{
    print "NO";
}
?>

<?php
$a = trim(fgets(STDIN));
$b = range(1, $a);
$c = array();
$d = array();
$e = 0;
for($x = 1; $x <= 120; $x++)
{
    $c = array_merge($c, $b);
}
for($x = 0; $x < count($c); $x++)
{
    $e += $x;
    if($c[$e] == "")
    {
        break;
    }
    else
    {
        array_push($d, $c[$e]);
    }
}
$f = array_unique($d);
if(count($f) == $a)
{
    print "YES";
}
else
{
    print "NO";
}
?>

<?php
$a = trim(fgets(STDIN));
$b = range(1, $a);
$b = array_merge($b, $b);
$c = array();
$d = array();
$e = 0;
for($x = 1; $x <= 64; $x++)
{
    $c = array_merge($c, $b);
}
for($x = 0; $x < count($c); $x++)
{
    $e += $x;
    if($c[$e] == "")
    {
        break;
    }
    else
    {
        $d[$x] = $c[$e];
    }
}
$f = array_unique($d);
if(count($f) == $a)
{
    print "YES";
}
else
{
    print "NO";
}
?>

<?php
$a = trim(fgets(STDIN));
$b = range(1, $a);
$c = array();
$d = array();
$e = 0;
for($x = 1; $x <= 100; $x++)
{
    $c = array_merge($c, $b);
}
for($x = 0; $x < count($c); $x++)
{
    $e += $x;
    if($c[$e] == "")
    {
        break;
    }
    else
    {
        array_push($d, $c[$e]);
    }
}
$f = array_unique($d);
if(count($f) == $a)
{
    print "YES";
}
else
{
    print "NO";
}
?>


<?php

$n = fgets(STDIN);
$str = fgets(STDIN);

$str = trim($str);

if ($n == 1 && $str[0] == '0') {
    fprintf(STDOUT, "No");
    return;
}

if ($n == 1 && $str[0] == '1') {
    fprintf(STDOUT, "Yes");
    return;
}

if ($str[strlen($str) - 1] == $str[strlen($str) - 2] && $str[strlen($str) - 1] == 0) {
    fprintf(STDOUT, "No");
    return;
}

if ($str[0] == $str[1] && $str[1] == 0) {
    fprintf(STDOUT, "No");
    return;
}

for($i=0;$i<strlen($str) - 1;$i++) {
    if ($str[$i] == $str[$i+1] && $str[$i] == 1) {
        fprintf(STDOUT, "No");
        return;
    }
}

for($i=0;$i<strlen($str) - 2;$i++) {
    if ($str[$i] == $str[$i+1] && $str[$i+1] == $str[$i+2] && $str[$i] == 0) {
        fprintf(STDOUT, "No");
        return;
    }
}

fprintf(STDOUT, "Yes");

<?php

$n = fgets(STDIN);
$str = fgets(STDIN);

if ($n == 1 && $str[0] == '0') {
    fprintf(STDOUT, "No");
    return;
}

if ($n == 1 && $str[0] == '1') {
    fprintf(STDOUT, "Yes");
    return;
}

if ($str[strlen($str) - 1] == $str[strlen($str) - 2] && $str[strlen($str) - 1] == 0) {
    fprintf(STDOUT, "No");
    return;
}

if ($str[0] == $str[1] && $str[1] == 0) {
    fprintf(STDOUT, "No");
    return;
}

$t = 0;

for($i=0;$i<strlen($str) - 1;$i++) {
    if ($str[$i] == $str[$i+1] && $str[$i] == 1) {
        fprintf(STDOUT, "No");
        $t = 1;
        break;
    }
}

for($i=0;$i<strlen($str) - 2;$i++) {
    if ($str[$i] == $str[$i+1] && $str[$i+1] == $str[$i+2] && $str[$i] == 0) {
        fprintf(STDOUT, "No");
        $t = 1;
        break;
    }
}

if ($t == 0) {
    fprintf(STDOUT, "Yes");
}

<?php

$n = fgets(STDIN);
$str = fgets(STDIN);

$str = trim($str);

if ($n == 1 && $str[0] == '0') {
    fprintf(STDOUT, "No");
    return;
}

if ($n == 1 && $str[0] == '1') {
    fprintf(STDOUT, "Yes");
    return;
}

if ($str[strlen($str) - 1] == $str[strlen($str) - 2] && $str[strlen($str) - 1] == 0) {
    fprintf(STDOUT, "No");
    return;
}

if ($str[0] == $str[1] && $str[1] == 0) {
    fprintf(STDOUT, "No");
    return;
}

$t = 0;

for($i=0;$i<strlen($str) - 1;$i++) {
    if ($str[$i] == $str[$i+1] && $str[$i] == 1) {
        fprintf(STDOUT, "No");
        $t = 1;
        break;
    }
}

for($i=0;$i<strlen($str) - 2;$i++) {
    if ($str[$i] == $str[$i+1] && $str[$i+1] == $str[$i+2] && $str[$i] == 0) {
        fprintf(STDOUT, "No");
        $t = 1;
        break;
    }
}

if ($t == 0) {
    fprintf(STDOUT, "Yes");
}

<?php

$n = fgets(STDIN);
$str = fgets(STDIN);

if ($n == 1 && $str[0] == '0') {
    fprintf(STDOUT, "No");
    return;
}

$t = 0;

for($i=0;$i<strlen($str) - 1;$i++) {
    if ($str[$i] == $str[$i+1]) {
        fprintf(STDOUT, "No");
        $t = 1;
        break;
    }
}

if ($t == 0) {
    fprintf(STDOUT, "Yes");
}


<?PHP
$fileIN = fopen("php://stdin", "r");
$fileOUT = fopen("php://stdout", "w");

$dataIN = explode(" ", trim(fgets($fileIN)));

if ($dataIN[0] == $dataIN[1]) {
    fprintf($fileOUT, "infinity \n");
} else if ($dataIN[0] < $dataIN[1]) {
    fprintf($fileOUT, "0 \n");
} else {
    $rs = 0;
    $a = $dataIN[0];
    $b = $dataIN[1];
    $d = $a - $b;
    for ($i = 1; $i * $i <= $d; ++$i) {
        if ($d % $i == 0) {
            $j = floor($d / $i);
            if ($a % $i == $b) {
                $rs++;
            }
            if ($a % $j == $b) {
                $rs++;
            }
            if ($i == $j && $i > $b) {
                $rs--;
            }
        }
    }
    fprintf($fileOUT, $rs);
    //echo $rs;
}

fclose($fileIN);
fclose($fileOUT);
?>

<?php
list ($a, $b) = explode(" ", trim(fgets(STDIN)));

function all_divisors($n) {
  $divs = array();
  for ($i = 2; $i <= sqrt($n); ) {
    if ($n % $i == 0) {
      @$divs[$i]++;
      $n /= $i;
    } else {
      $i++;
    }
  }
  if ($n != 1 || empty($divs)) {
    @$divs[$n]++;
  }
  return $divs;
}

function next_comb(&$comb, $orders, $pos = 0) {
  if ($pos >= count($comb)) {
    return false;
  }
  $comb[$pos]++;
  if ($comb[$pos] > $orders[$pos]) {
    $comb[$pos] = 0;
    return next_comb($comb, $orders, $pos + 1);
  }
  return true;
}

if ($a == $b) {
  echo "infinity\n";
} elseif ($b > $a) {
  echo "0\n";
} elseif ($a == 1 && $b == 0) {
  echo "1\n"; // fuck :) too lazy to actually fix
} else {
  $divs = all_divisors($a - $b);
  $divisors = array_keys($divs);
  $orders = array_values($divs);
  $comb = array_fill(0, count($divs), 0);
  $ok = 0;
  do {
    $tryN = 1;
    foreach ($comb as $i => $count) {
      $tryN *= pow($divisors[$i], $count);
    }
    if ($tryN > $b) {
      $ok++;
    }
  } while (next_comb($comb, $orders));
  echo "$ok\n";
}

<?PHP
$fileIN = fopen("php://stdin", "r");
$fileOUT = fopen("php://stdout", "w");

$dataIN = explode(" ", trim(fgets($fileIN)));

$rs = 0;

if ($dataIN[0] == $dataIN[1]) {
    fprintf($fileOUT, "infinity \n");
} else if ($data[0] < $data[1]) {
    fprintf($fileOUT, "0 \n");
} else {
    $d = $a - $b;
    for ($i = 1; $i * $i <= $d; ++$i) {
        if ($d % $i == 0) {
            $j = $d / $i;
            if ($a % $i == $b) {
                $rs++;
            }
            if ($a % $j == $b) {
                $rs++;
            }
            if ($i == $j && $i > $b) {
                $rs--;
            }
        }
    }
}

fprintf($fileOUT, $rs);

fclose($fileIN);
fclose($fileOUT);
?>

<?PHP
$fileIN = fopen("php://stdin", "r");
$fileOUT = fopen("php://stdout", "w");

$dataIN = explode(" ", trim(fgets($fileIN)));

$rs = 0;

if ($dataIN[0] == $dataIN[1]) {
    fprintf($fileOUT, "infinity \n");
} else if ($data[0] < $data[1]) {
    fprintf($fileOUT, "0 \n");
} else {
    $a = $data[0];
    $b = $data[1];
    $d = $a - $b;
    for ($i = 1; $i * $i <= $d; ++$i) {
        if ($d % $i == 0) {
            $j = floor($d / $i);
            if ($a % $i == $b) {
                $rs++;
            }
            if ($a % $j == $b) {
                $rs++;
            }
            if ($i == $j && $i > $b) {
                $rs--;
            }
        }
    }
    fprintf($fileOUT, $rs);
}

fclose($fileIN);
fclose($fileOUT);
?>

<?PHP
$fileIN = fopen("in.txt", "r");
$fileOUT = fopen("out.txt", "w");

$dataIN = explode(" ", trim(fgets($fileIN)));

if ($dataIN[0] == $dataIN[1]) {
    fprintf($fileOUT, "infinity \n");
} else if ($dataIN[0] < $dataIN[1]) {
    fprintf($fileOUT, "0 \n");
} else {
    $rs = 0;
    $a = $dataIN[0];
    $b = $dataIN[1];
    $d = $a - $b;
    for ($i = 1; $i * $i <= $d; ++$i) {
        if ($d % $i == 0) {
            $j = floor($d / $i);
            if ($a % $i == $b) {
                $rs++;
            }
            if ($a % $j == $b) {
                $rs++;
            }
            if ($i == $j && $i > $b) {
                $rs--;
            }
        }
    }
    fprintf($fileOUT, $rs);
    //echo $rs;
}

fclose($fileIN);
fclose($fileOUT);
?>

<?PHP
$fileIN = fopen("php://stdin", "r");
$fileOUT = fopen("php://stdout", "w");

$dataIN = explode(" ", trim(fgets($fileIN)));

$rs = 0;

if ($dataIN[0] == $dataIN[1]) {
    fprintf($fileOUT, "infinity \n");
} else if ($data[0] < $data[1]) {
    fprintf($fileOUT, "0 \n");
} else {
    $a = $data[0];
    $b = $data[1];
    $d = $a - $b;
    for ($i = 1; $i * $i <= $d; ++$i) {
        if ($d % $i == 0) {
            $j = $d / $i;
            if ($a % $i == $b) {
                $rs++;
            }
            if ($a % $j == $b) {
                $rs++;
            }
            if ($i == $j && $i > $b) {
                $rs--;
            }
        }
    }
}

fprintf($fileOUT, $rs);

fclose($fileIN);
fclose($fileOUT);
?>

<?php
list ($a, $b) = explode(" ", trim(fgets(STDIN)));

function all_divisors($n) {
  $divs = array();
  for ($i = 2; $i <= sqrt($n); ) {
    if ($n % $i == 0) {
      @$divs[$i]++;
      $n /= $i;
    } else {
      $i++;
    }
  }
  if ($n != 1 || empty($divs)) {
    @$divs[$n]++;
  }
  return $divs;
}

function next_comb(&$comb, $orders, $pos = 0) {
  if ($pos >= count($comb)) {
    return false;
  }
  $comb[$pos]++;
  if ($comb[$pos] > $orders[$pos]) {
    $comb[$pos] = 0;
    return next_comb($comb, $orders, $pos + 1);
  }
  return true;
}

if ($a == $b) {
  echo "infinity\n";
} elseif ($b > $a) {
  echo "0\n";
} else {
  $divs = all_divisors($a - $b);
  $divisors = array_keys($divs);
  $orders = array_values($divs);
  $comb = array_fill(0, count($divs), 0);
  $ok = 0;
  do {
    $tryN = 1;
    foreach ($comb as $i => $count) {
      $tryN *= pow($divisors[$i], $count);
    }
    if ($tryN > $b) {
      $ok++;
    }
  } while (next_comb($comb, $orders));
  echo "$ok\n";
}


<?php

###### IO ######
error_reporting(E_ALL);
error_reporting(0);

function readString($f) {
	$r = array(
		"\r" => '',
		"\n" => '',
	);
	return strtr(fgets($f), $r);
}

function readNumString($f) {
	return trim(fgets($f));
}

function stringToArray($str) {
	return str_split($str);
}

function readNum($f, $is_int = false) {
	$v = readNumString($f);
	return $is_int ? intval($v) : floatval($v);
}

function readStringExplode($f, $delimiter = ' ') {
	$v = readNumString($f);
	if ($delimiter == '') {
		$return = stringToArray($v);
	} else {
		$return = explode($delimiter, $v);
	}
	$callf = 'trim';
	return array_map($callf, $return);
}

function readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {
	$v = readNumString($f);
	if ($delimiter == '') {
		$return = stringToArray($v);
	} else {
		$return = explode($delimiter, $v);
	}
	$callf = $is_int ? 'intval' : 'floatval';
	return array_map($callf, $return);
}

###### /IO ######

function getAnswer($is_test = false, $f = false) {
	if ($is_test === false) {
		$f = STDIN;
	}
	/* begin body */
	$n = readNum($f);
	$str = '';
	for ($i = 1; $i <= 1001; $i++) {
		$str.=$i;
	}
	echo $str[$n-1];
	/* / end body */
}

if (empty($is_test))
	getAnswer();


<?php
/*
 * Secdra @2020
 */
function move($x)
{
    if ($x == 0) return 0;
    if ($x >= 5) {
        $x -= 5;
        return move($x) + 1;
    } else {
        return 1;
    }
}

fscanf(STDIN, "%d", $x);
printf("%d", move($x));

<?php
$a = trim(fgets(STDIN));
$b = ceil($a / 5);
print $b;
?>

<?php

$main = new MainClass;

fscanf(STDIN, "%d", $n);

echo $main->solution($n);
// End of interface

class MainClass {
	//617-A. Elephant
	//public $problemLink = 'https://codeforces.com/problemset/problem/617/A';
	//public $submissionLink = '';

	public function solution($n){
		$res = 0;
		for ($i = 5; $i>0; $i--){
			$quotient = $n/$i;
			$intQuotient = (int) $quotient;
			$currentReminder = $n % $i;
			if ($intQuotient > 0){
				$res = $res + $intQuotient;
			};
			if ($currentReminder === 0){
				break;
			};
			if ($currentReminder > 0){
				$n = $currentReminder;
			};
		}
		return $res;
	}
}

<?php
$main = new MainClass;

fscanf(STDIN, "%d", $n);

echo $main->solution($n);
// End of interface

class MainClass {
	//617-A. Elephant
	//public $problemLink = 'https://codeforces.com/problemset/problem/617/A';
	//public $submissionLink = '';

	public function solution($n){
		$res = 0;
		for ($i = 5; $i>0; $i--){
			$intQuotient = (int)($n/$i);
			$currentReminder = $n % $i;
			if ($intQuotient > 0){
				$res = $res + $intQuotient;
			};
			if ($currentReminder === 0){
				break;
			};
			if ($currentReminder > 0){
				$n = $currentReminder;
			};
		}
		return $res;
	}
}

<?php
$length = (int) trim(fgets(STDIN));
$steps = [5, 4, 3, 2, 1];

$total = 0;
foreach ($steps as $step) {
    if ($length < $step) continue;
    $temp = $length % $step;
    $total = $total + ($length - $temp)/$step;
    $length = $temp;
}
echo $total;

<?php

$elphnt = intval(readline());

$ans = 0;

for($i=5; $i>0; $i--)
{
	$ans +=  intval($elphnt / $i);
	$elphnt %= $i;
}

echo $ans."\n";

<?php

$elphnt = intval(readline());
echo ceil($elphnt/5)."\n";

<?php

function _Fil_Dir($n){
	$num = 0;

	if($num += floor($n / 5))
		$n = $n % 5;

	if($num += floor($n / 4))
		$n = $n % 4;

	if($num += floor($n / 3))
		$n = $n % 3;

	if($num += floor($n / 2))
		$n = $n % 2;

	if($num += floor($n / 1))
		$n = $n % 1;

	return $num;
}

$dir = fopen("php://stdin", 'r');
echo _Fil_Dir(stream_get_contents($dir));

?>

<?php
	echo ceil(trim(fgets(STDIN))/5);
?>

<?php
function input()
{
    while (($line = trim(fgets(STDIN))) != PHP_EOL) {
        yield $line;
    }
}

function put($r)
{
    echo $r . PHP_EOL;
}

$count = 1;
foreach (input() as $line) {
    $dis = $line;
    $w = 0;
    function walk($dis,$w) {
       if ($dis == 0) {
           put($w);
           die();
       }

       $i = 0;
       if ($dis > 4) $i=5;
       elseif ($dis > 3) $i=4;
       elseif ($dis > 2) $i=3;
       elseif ($dis > 1) $i=2;
       else $i=1;

       walk($dis-$i, $w+1);
    }
    walk($dis,$w);

    if ((--$count) == 0) {
        break;
    }
}

<?php
function input()
{
    while (($line = trim(fgets(STDIN))) != PHP_EOL) {
        yield $line;
    }
}

function put($r)
{
    echo $r . PHP_EOL;
}

$count = 1;
foreach (input() as $line) {
    $dis = $line;
    $w = 0;
    function walk($dis,$w) {
       if ($dis == 0) {
           return $w;
       }

       $i = 0;
       if ($dis > 4) $i=5;
       elseif ($dis > 3) $i=4;
       elseif ($dis > 2) $i=3;
       elseif ($dis > 1) $i=2;
       else $i=1;

       return walk($dis-$i, $w+1);
    }
    put(walk($dis,$w));

    if ((--$count) == 0) {
        break;
    }
}

<?php

$nr = trim(fgets(STDIN));
$walk = 0;
for ($i = 5; $i >= 1; $i--) {
    $walk += floor($nr / $i);
    $nr = $nr % $i;
}

echo $walk;

<?php
$x = intval(fgets(STDIN));
print ceil($x / 5);

<?php
$path = trim(fgets(STDIN));
if ($path%5==0)echo $path/5;
else echo (intval($path/5)+1);

<?php
$input=fgets(STDIN);
$ghadam=0;
while($input>=5){
      $ghadam++;
     @$input-=5;
}
while($input>=4){
      $ghadam++;
      @$input-=4;
}
while($input>=3){
      $ghadam++;
      @$input-=3;
}
while($input>=2){
      $ghadam++;
     @$input-=2;
}
while($input>=1){
      $ghadam++;
      @$input-=1;
}
echo $ghadam;
?>

<?php
fscanf(STDIN,"%d",$x);
$res=ceil($x/5);
echo "$res";

<?php $a= fgets(STDIN); if($a <= 5){ echo 1;}else{$value=floor($a/5);if($value<=3){echo 3;}elseif($a%5==0){echo $value;}else{echo $value+1;}}

<?php
$x = trim(fgets(STDIN));
for($m = 1; $m <= 5; ++$m) {
	$move[] = ceil($x/$m);
}
echo min($move);

<?php
    $n = trim(fgets(STDIN));
    $res = ($n + 4)/5;
    echo(floor($res));

?>

<?php
error_reporting(0);
$handle = fopen("php://stdin", "r");
$data = explode("\n", stream_get_contents(fopen("php://stdin", "r")));
$input = [];

foreach ($data as $index => $line) {
    $input[$index] = explode(" ", trim($line));
}

// Solve past this line
$friend = $input[0][0];
$output = (int)($friend / 5);

echo $output >= 1 ? $output+($friend%5 ? 1: 0): 1;

<?php
error_reporting(0);
$handle = fopen("php://stdin", "r");
$data = explode("\n", stream_get_contents(fopen("php://stdin", "r")));
$input = [];

foreach ($data as $index => $line) {
    $input[$index] = explode(" ", trim($line));
}

// Solve past this line
echo (int)(($input[0][0] + 4) / 5);

<?php
$n = trim(fgets(STDIN));
$a = floor($n / 5);
if ($n % 5 == 0)
    echo $a;
else
    echo $a + 1;
?>

<?php

//First Get The Input.
$input = file_get_contents("php://stdin");

$our_number = 0;
$steps = 0;

//1 -> 5.
for($i = 5;$i >= 1;$i--) {

    while(($our_number + $i) <= $input) {

        $steps++;
        $our_number += $i;

    }

    if($our_number == $input) {

        break;

    }

}

echo $steps;

<?php
$x=trim(fgets(STDIN));
$hasil=$x/5;
echo ceil($hasil);

?>

<?php

fscanf(STDIN, '%d', $x);
$div = (int) ($x / 5);
$mod = $x % 5;
printf('%d' . PHP_EOL, $div + ($mod ? 1 : 0));

<?php

$n = (int)fgets(STDIN);

$answer = intval($n / 5);
$n %= 5;

$answer += intval($n / 4);
$n %= 4;

$answer += intval($n / 3);
$n %= 3;

$answer += intval($n / 2);
$n %= 2;

$answer += intval($n / 1);

print($answer);

<?php
$f = fopen( 'php://stdin', 'r' );
$moves = 0;
while( $line = fgets( $f ) ) {
  $moves = $line;
}

fclose( $f );

if ($moves < 6) {
    echo 1;
    die();
}
$rest = 0;
$counter = 0;
while($moves > 5) {
    $moves = $moves - 5;
    $counter ++;
}
echo $counter + 1;
?>

<?php

$number = (int)fgets(STDIN);
print_r(intdiv($number, 5) + ($number % 5 == 0 ? 0 : 1));

<?php
	fscanf(STDIN, "%d", $x);
	echo intval(($x+4)/5);
?>

<?php

$intrare = (int)readline();
$rez = 0;

if($intrare % 5 == 0 ){
	$rez = (int) ($intrare/5);
}else{
	$rez = (int)( $intrare/5+1);
}
echo $rez;

<?php

$point = (int)readline();

$array = array(5 , 4 , 3 , 2 , 1);

foreach($array as $number) {
    echo ceil((($point - ($point%$number))/$number) + ($point%$number/($number-1)));
break;
}

<?php
$n = readline();
echo floor($n / 5) +
     floor($n % 5 / 4) +
     floor($n % 4 / 3) +
     floor($n % 3 / 2) +
     $n % 1;

<?php
$n = (int) fgets(STDIN);
$step = $n / 5;
if($n % 5 ) {
    $step = $ste + 1;
}

echo $step;

<?php

function _Fil_Dir($n){
	$num = 0;

	if($num += floor($n / 5))
		$n = $n % 5;

	if($num += floor($n / 4))
		$n = $n % 4;

	if($num += floor($n / 3))
		$n = $n % 3;

	if($num += floor($n / 2))
		$n = $n % 2;

	if($num += floor($n / 1))
		$n = $n % 1;

	return $num;
}

$dir = fopen("php://stdin", 'r');
echo stream_get_contents(_Fil_Dir($dir));

?>

<?php

function _Fil_Dir($n){
	$num = 0;

	if($num += floor($n / 5))
		$n = $n % 5;

	if($num += floor($n / 4))
		$n = $n % 4;

	if($num += floor($n / 3))
		$n = $n % 3;

	if($num += floor($n / 2))
		$n = $n % 2;

	if($num += floor($n / 1))
		$n = $n % 1;

	return $num;
}

$dir = fopen("php://stdin", 'r');
echo _Fil_Dir($dir);

?>

<?php
$x = $_POST['x'];
print ceil($x / 5);

<?php $a=fgets(STDIN); if($a <= 5){return 1;}else{$value=floor($a/5);if($value<=3){return 3;}else{return $value+1;}}

<?php $a=fgets(STDIN); if($a<=5){return 1;}

<?php $a=fgets(STDIN); echo floor($a/5)+1;

<?php
$n = trim(fgets(STDIN));
$a = floor($n / 5);
$b = $n - ($a * 5);
echo $b + $a;
?>

<?php

//First Get The Input.
$input = file_get_contents("php://stdin");

$our_number = 0;
$steps = 0;

//1 -> 5.
for($i = 5;$i >= 1;$i--) {

    while(($our_number + $i) < $input) {

        $steps++;
        $our_number += $i;

    }

    if($our_number == $input) {

        break;

    }

}

echo $steps;

<?php
$x=trim(fgets(STDIN));
$hasil=$x/5;
echo $hasil;

?>

<?php
$number = fgets(STDIN);

if($number % 5 == 0) {
	$result = $number / 5;
} elseif($number % 4 == 0) {
	$result = $number / 4;
} elseif($number % 3 == 0) {
	$result = $number / 3;
} elseif($number % 2 == 0) {
	$result = $number / 2;
} elseif($number % 1 == 0){
	$result = $number / 1;
}

print_r($result);

<?php

$point = (int)readline();

$array = array(5 , 4 , 3 , 2 , 1);

foreach($array as $number) {
    echo (($point - ($point%$number))/$number) + ($point%$number/($number-1));
break;
}

<?php

$point = (int)readline();

$array = array(5 , 4 , 3 , 2 , 1);

foreach($array as $number) {

    if($point % $number == 0) {
        echo $point/$number;
        break;
    }

}