Entry Check
Source: codechef
Difficulty: 177

Entry Check
Chef wants to visit a fair, but there is an age restriction for entry. A person can attend the fair if their age is
greater than or equal
to$10$years.
You are given Chef's age, represented by the integer$X$. Your task is to determine whether Chef is eligible to attend the fair or not.
If Chef's age is greater than or equal to 10, print "YES".
Otherwise, print "NO".
Input Format
A single integer$X$, representing Chef's age.
Output Format
Print
YES
if Chef is eligible to attend the fair , otherwise print
NO
.
You may print each character of the string in uppercase or lowercase (for example, the strings
YES
,
yEs
,
yes
, and
yeS
will all be treated as identical).
Constraints$1 \leq X \leq 20$Sample 1:
Explanation:
Since Chef is$10$years old, which is the minimum age required to attend the fair, he can attend the fair.
Sample 2:
Input
Output
9
NO
Explanation:
Since Chef is$9$years old, which is below the minimum age required to attend the fair, he cannot attend the fair.
Sample 3:
Input
Output
11
YES
Explanation:
Since Chef is$11$years old, which is above the minimum age required to attend the fair, he can attend the fair.

Sample Input:
10

Sample Output:
YES

C++ solution:
#include <bits/stdc++.h>
using namespace std;

int main() {
    // your code goes here
int x;
cin >> x;
if(x>=10) cout<<"Yes";
else cout << "No";
}

Go solution:
package main
import "fmt"

func main(){
    // your code goes here
    var age int
    fmt.Scan(&age)
    if age >= 10 {
        fmt.Println("YES")
    } else {
        fmt.Println("NO")
    }
}

Java solution:
import java.util.*;
import java.lang.*;
import java.io.*;

class Codechef
{
    public static void main (String[] args) 
    {
        int age;
        Scanner sc = new Scanner(System.in);
        age = sc.nextInt();
        
        if(age>=10)
        System.out.println("Yes");
        else
        System.out.println("No");
    }
}

JavaScript solution:
let stdInput = '';
process.stdin.on('data' , input => stdInput += input);
process.stdin.on('end',()=>{
    const input = stdInput.trim();
    if (input>=10){
        console.log("Yes")
    }
    else{
        console.log("No")
    }
});

Python solution:
# cook your dish here
a=int(input())
if a>=10:
    print("yes")
else:
    print("no")

Ruby solution:
# Read input and convert to integer safely
x = gets.to_i

# Check eligibility and print result
puts x >= 10 ? "YES" : "NO"