jiahuimbzuai/CoQuIR huggingface dataset:
//  [rust]
//---------- Begin IO utilities ----------
// Thanks to https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:tt : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! p {
    ($v:ident) => {
        println!("{}", $v);
    };
    ($v:ident, $($t:ident),*) => {
        print!("{}", $v);
        ($(print!(" {}", $t)),*);
        println!();
    }
}
#[allow(unused_macros)]
macro_rules! ps {
    ($v:ident) => {
        println!("{}", $v.iter().collect::<String>());
    };
    ($v:ident, $($t:ident),*) => {
        print!("{}", $v.iter().collect::<String>());
        ($(print!(" {}", $t.iter().collect::<String>())),*);
        println!();
    }
}
#[allow(dead_code)]
fn pv<T: std::string::ToString>(v: &[T], sep: &str) {
    let s = v.iter().map(|e| e.to_string()).collect::<Vec<String>>().join(sep);
    println!("{}", s);
}
#[allow(dead_code)]
fn pvs(v: &[Vec<char>], sep:&str) {
    let s = v.iter().map(|e| e.iter().collect::<String>()).collect::<Vec<String>>().join(sep);
    println!("{}", s);
}
//---------- End IO utilities ----------

fn main() {
    input!{
        s: u8,
        w: u8,
    }
    if s <= w {
        println!("unsafe");
    } else {
        println!("safe");
    }
}
//  [rust]
fn main() {
  proconio::input! {
    s: i32,
    w: i32,
  }
  if s<= w { println!("unsafe"); }
  else { println!("safe"); }
}
//  [rust]
use proconio::input;

fn main() {
    input! {
        s: usize,
        w: usize,
    }

    solve(s, w);
}

fn solve(s: usize, w: usize) {
    if 2 * w >= s {
        println!("unsafe");
    } else {
        println!("safe");
    }
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        s: u64,
        w: u64,
    };

    if w * 2 >= s {
        println!("unsafe")
    } else {
        println!("safe")
    }
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {s: u64, k: u64};

    if k * 2 >= s {
        println!("unsafe")
    } else {
        println!("safe")
    }
}
//  [swift]
let line = readLine()!
let sw = line.split(separator: " ").map { Int($0)! }
sw[0] <= sw[1] ? print("unsafe") : print("safe")
//  [swift]
let inputs = readLine()!.split(separator: " ").map { Int($0)! }
let r = inputs[0] <= inputs[1]
print(r ? "unsafe" : "safe")
//  [swift]
let sw = readLine()!.split(separator: " ").map { Int($0)! }
let (s, w) = (sw[0], sw[1])

if w >= s { print("unsafe") } else { print("safe")}
//  [swift]
import Foundation

func readInts() -> [Int]{
    readLine()!.split(separator: " ").map { Int($0)! }
}

func main(){
    let sw = readInts()
    
    print(sw[0] <= sw[1] ? "unsase": "safe")
}
main()
//  [swift]
import Foundation

func readInts() -> [Int]{
    readLine()!.split(separator: " ").map { Int($0)! }
}

func main(){
    let sw = readInts()
    
    print(sw[0] >= sw[1] ? "unsase": "safe")
}
main()
//  [typescript]
class AtCoder {
  // 入力系
  input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);
  input_i=-1;

  N=this.input[0];
  M=this.input[1];
  SN=String(this.input[0]);
  SM=String(this.input[1]);

  n(){
    this.input_i++;
    return Number(this.input[this.input_i]);
  }
  nn(n:number):number[]{
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.n());
    }
    return a;
  }
  s(){
    this.input_i++;
    return String(this.input[this.input_i]);
  }
  ss(n:number):string[]{
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.s());
    }
    return a;
  }

  // コンソール
  o(...a:any){
    console.log(...a);
  }

  // Math
  abs(a:number){
    return Math.abs(a);
  }
  min(...a:number[]){
    return Math.min(...a);
  }
  max(...a:number[]){
    return Math.max(...a);
  }
  floor(a:number){
    return Math.floor(a);
  }
  ceil(a:number){
    return Math.ceil(a);
  }
  round(a:number){
    return Math.round(a);
  }

  // ソート
  asc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return a-b});
  }
  desc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return b-a});
  }

  // 自作
  gcd(...arr:number[]):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=x;
    }
    return arr[arr.length-1];
  };
  lcm(...arr:number[]):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=arr[i]*arr[i+1]/x;
    }
    return arr[arr.length-1];
  };
  isPrime(n:number):boolean{
    if(n < 2) return false;
    const suq=Math.sqrt(n);
    for(let i=2;i<=suq;i++){
      if(n%i==0){
        return false;
      }
    }return true;
  };
  deduplicate(a:any[]):any[]{
    return Array.from(new Set(a));
  };
  f(roop:number, callback:any){
    for(let i=0;i<roop;i++){
      callback(i);
    }
  };
  Yes(){
    console.log('Yes');
  }
  No(){
    console.log('No');
  }
  YES(){
    console.log('YES');
  }
  NO(){
    console.log('NO');
  }
}
const m = () => {
  const o = new AtCoder()
  o.o(o.n() <= o.n() ? 'unsafe' : 'safe')
}
m();
//  [typescript]
//0:実行モード
//1:開発モード
//2:最終テストモード
const sys_debugMode : number = 0;

function chk(in_data1 : any, in_data2? : any) : void{
	if (sys_debugMode == 0 || sys_debugMode == 2){
		return;
	}
	else if (in_data2 === undefined){
		console.log(in_data1);
	}
	else{
		console.log(in_data1 + "[" + typeof(in_data2) + "] =", in_data2);
	}
}

function prt(in_data : any) : void{
	console.log(in_data);
}

class ParamManager {

	private a_s_inputLines : string[];
	private n_maxLine : number;
	private n_nowLineCnt : number;

	constructor(){
		this.a_s_inputLines = this.inputLines();
		this.n_maxLine = this.a_s_inputLines.length;
		this.descLines();
		this.n_nowLineCnt = 1;
	}
	inputLines(){
		const fs = require('fs');

		let text;
		if(sys_debugMode == 0){
			text = fs.readFileSync("/dev/stdin", 'utf8');
		}
		else{
			text = fs.readFileSync("input.txt", 'utf8');
		}

		const line:string[] = text.toString().replace(/\r/g, "").split('\n');

		return line;
	}
	descLines(){
		chk("ParamManager.a_s_inputLines", this.a_s_inputLines);
	}
	getNextLine(in_s_type?):any{
		if (this.n_nowLineCnt > this.n_maxLine){
			chk("ParamManager.getNextLine","No Next Line!");
			return;
		}
		const s_returnLine:string = this.a_s_inputLines[this.n_nowLineCnt - 1];

		this.n_nowLineCnt++;
		
		if (in_s_type == "n"){
			return parseInt(s_returnLine);
		}
		else if (in_s_type == "a"){
			return s_returnLine.split(" ");
		}
		else if (in_s_type == "an"){
			const a_s_temp = s_returnLine.split(" ");
			const a_n_temp = a_s_temp.map(function(str){return Number(str)});
			return a_n_temp;
		}
		else if(in_s_type == "s"){
			const aMoji:string[] = s_returnLine.split("");
			return aMoji;
		}
		else if(in_s_type == "sn"){
			const aMoji:string[] = s_returnLine.split("");
			const aNum:number[] = aMoji.map(function(str){return Number(str)});
			return aNum;
		}
		else{
			return s_returnLine;
		}
	}
}
const paramManager = new ParamManager();
//==================================================
//https://atcoder.jp/contests/abc164/tasks/abc164_a
//A - Sheep and Wolves / 
//==================================================
class Param{
	sheepNum:number;
	wolfNum:number;

	constructor(){
		chk("--------------------------------------------------");
		chk("パラメータ");
		//羊がS匹、狼がW匹います。
		const aTemp = paramManager.getNextLine("an");
		this.sheepNum = aTemp[1-1];
		this.wolfNum  = aTemp[2-1];

		chk(this);
	}
}
const param = new Param();
//==================================================
class Manager{

	constructor(){

		this.main();
	}

	main():void{
		chk("--------------------------------------------------");
		chk("main");

		this.resultOutput();
	}

	resultOutput():void{
		chk("--------------------------------------------------");
		chk("resultOutput");
		//狼の数が羊の数以上のとき、羊は狼に襲われてしまいます。
		//羊が狼に襲われるなら unsafe、襲われないなら safe を出力してください。
		if(param.wolfNum >= param.sheepNum){
			prt("unsafe");
		}
		else{
			prt("safe");
		}
	}

}
const manager = new Manager();
//==================================================
//  [typescript]
import * as fs from 'fs';

export function Main(input: string) {
    const [s, w] = input.split(' ').map(int => parseInt(int));  // ?

    let result = w >= s ? 'unsafe' : 'safe';

    //output

    console.log(result);
    return result;
}

// Don't edit this line!
Main(fs.readFileSync("/dev/stdin", "utf8"));
//  [typescript]
import * as fs from 'fs';

export function Main(input: string) {
    const str = parseInt(input).toString();   // ?
    const sequence = input.split('').map(int => parseInt(int)); //?
    let result = 0;

    for(let i = 0; i < input.length; i++) {
        for(let j = i + 1; j <= input.length; j++) {
            [i, j] //?
            const subst = str.substring(i, j); //?
            const int = parseInt(subst);    //?
            if(int % 2019 === 0) {
                result++;
            }//?
        }
    }

    //output

    console.log(result);
    return '' + result;
}

// Don't edit this line!
Main(fs.readFileSync("/dev/stdin", "utf8"));
//  [typescript]
#include <bits/stdc++.h>
#define rep(i, a, n) for (int i = (int)(a); i <= (int)(n); ++i)
#define rrep(i, a, n) for (int i = (int)(a); i >= (int)(n); --i)
#define debug(x) cerr << #x << " = " << x << "\n"
#define debugv(x) \
  rep(f, 0, (x.size() - 1)) cerr << x[f] << (f == (x.size() - 1) ? "\n" : " ")
#define debug2(x, y)                       \
  cerr << "(" << #x << "," << #y << ") = " \
       << "(" << x << "," << y << ")\n"
#define all(x) x.begin(), x.end()
#define each(a, x) for (auto& a : (x))
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define int long long
#define yn(x) puts((x ? "Yes" : "No"))
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
const int MX = 1e5 + 5, INF = 5LL << 57, MOD = 1e9 + 7;

int N, M;
string S;
vi va, vb;

void input() {
  ;
  cin>>N>>M;
  cout<<((N>>N) ? "unsafe" : "safe")<<endl;
  ;
}
void solve() {
  ;
  ;
}
signed main() {
  cout << setprecision(12);
  input();
  solve();
  return 0;
}
//  [python]
s = input()

allhi = ["hi"*i for i in range(1,20)]

if s in allhi:
    print("Yes")
else:
    print("No")
//  [python]
S=input()
if S in ['hi', 'hihi', 'hihihi', 'hihihihi', 'hihihihihi']:
    print('Yes')
else:
    print('No')
//  [python]
a = input()
if a == 'hi' or a == 'hihi' or a == 'hihihi' or a == 'hihihihi' or a == 'hihihihihi':
    print("Yes")
else:
    print("No")
//  [python]
s = input()
if len(s)%2 == 0:
  for i in len(s)//2:
    if s[2*i] != "h" and s[2*i+1] != "i":
      print("No")
      exit()
  print("Yes")
else:
  print("No")
//  [python]
s=input()
ans="No"
if s=="hi":
  ans="Yes"
for i in range(3,len(s)):
  if s[i-3]=="h" and s[i-2]=="i" and s[i-1]=="h" and s[i]=="i":
    ans="Yes"
print(ans)
//  [python]
s=input()
ans="No"
for i in range(len(s)-1):
  if s[i]=="h" and s[i+1]=="i":
    ans="Yes"
    break
print(ans)
//  [java]
import java.util.*;
import java.io.*;

public class Main{
  public static void main(String[] args)throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    try{
      String S = br.readLine();
      String s1 = "hi";
      String s2 = "hihi";
      String s3 = "hihihi";
      String s4 = "hihihihi";
      String s5 = "hihihihihi";
      boolean f = S.equals(s1) || S.equals(s2) || S.equals(s3) || S.equals(s4) || S.equals(s5);
      System.out.println(f ? "Yes" : "No");
    }catch(Exception e){
    }
  }
}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.Queue;

public class Main implements Runnable{

	public static void main(String[] args) {
		new Thread(null,new Main(), "" ,Runtime.getRuntime().maxMemory()).start();
	}
	
	public void run() {
		FastScanner sc=new FastScanner();
		String str=sc.next();
		boolean ans=str.length()%2==0;
		for(int i=0;i+1<str.length();i+=2) {
			ans&=str.substring(i,i+2).equals("hi");
		}
		System.out.println(ans?"Yes":"No");
	}
	
	void tr(Object...objects) {System.out.println(Arrays.deepToString(objects));}
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    
    public double nextDouble() { return Double.parseDouble(next());}
}
//  [java]
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String string = sc.nextLine();

		String regex = "hi";
		Pattern pt =Pattern.compile(regex);
		Matcher matcher = null;

		if (string.length() < 2) {
			System.out.println("No");
		}else {
			for (int i = 0; i < string.length(); i+=2) {
				matcher = pt.matcher(string.substring(i, i + 2));
				if (matcher.find() == false) {
					System.out.println("No");
					break;
				}
				if (i == string.length() - 2) {
					System.out.println("Yes");
				}
			}
		}
	}
}
//  [java]
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String string = sc.nextLine();

		String regex = "hi";
		Pattern pt =Pattern.compile(regex);
		Matcher matcher = null;

		for (int i = 0; i < string.length(); i+=2) {
			matcher = pt.matcher(string.substring(i, i + 2));
			if (matcher.find() == false) {
				System.out.println("No");
				break;
			}
			if (i == string.length() - 2) {
				System.out.println("Yes");
			}
		}

	}
}
//  [java]
package test;

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String string = sc.nextLine();

		String regex = "hi";
		Pattern pt =Pattern.compile(regex);
		Matcher matcher = null;

		for (int i = 0; i < string.length(); i+=2) {
			matcher = pt.matcher(string.substring(i, i + 2));
			if (matcher.find() == false) {
				System.out.println("No");
				break;
			}
			if (i == string.length() - 2) {
				System.out.println("Yes");
			}
		}

	}
}
//  [cpp]
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<string.h>
using namespace std;
char str[105];
int main(void)
{
	scanf("%s", str);
	int len = strlen(str);
	if (len % 2) {
		printf("No\n");
		return 0;
	}
	bool flag = 0;
	for (int i = 0; i < len; i+=2)
		if (!((str[i] == 'h') && (str[i + 1] == 'i'))) {
			flag = 1;
			break;
		}
	if (flag)
		printf("No\n");
	else
		printf("Yes\n");
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using in6 = int64_t;
using ind = double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  string s;
  cin >> s;
  int check = 0;
  int size = (int)s.size();
  if(size % 2 == 0) size /= 2;
  else check++;
  rep(i,size) {
    string a = s.substr(i,2);
    if(a != "hi") {
      check++;
      break;
    }
    i++;
  }
  if(check == 0) cout << "Yes" << endl;
  else cout << "No" << endl;
}
//  [cpp]
#include<iostream>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<map>
#include<set>
#include<stack>
#include<queue>
using namespace std;
typedef long long ll;
int main()
{
	int m,n,i,t,j,k;
	char s[1000];
	scanf("%s",&s);
	int flag=0;
	m=strlen(s);
	if(m%2!=0) flag=1;
	int p=0;
	while(m!=0&&flag==0)
	{
		if(s[p]!='h')
		{
			flag=1;
		}
		p++;m--;
		if(s[p]!='i')
		{
			flag=1;
		}
		p++;m--;
	}
	if(flag) printf("No");
	else printf("Yes");
}
//  [cpp]
#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using ll = long long; 
using ld = long double;
#define endl "\n"
//#define int long long
#define all(V) V.begin(),V.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
const int MOD = 1e9 + 7;
const ll INF = 1LL << 60;
const int inf = 1 << 25;
constexpr long double pi = 3.141592653589793238462643383279;
int dx[] = { 1,0,-1,0 };
int dy[] = { 0,1,0,-1 };
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll fact_mod(ll n, ll mod) {
    ll f = 1; for (int i = 2; i <= n; i++) f = f * (i % mod) % mod;
    return f;
}
ll gcd(ll a, ll b) {
    if (b == 0) return a;
    return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
    return a * b / gcd(a, b);
}
ll keta(ll n) {
    if (n == 0) return 1;
    ll count = 0;
    while (n != 0) {
        n /= 10;
        count++;
    }
    return count;
}
ll ketasum(ll n) {
    ll sum = 0;
    while (n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
ll mch(ll n) {
    if (n == 1) return 1;
    else return n * mch(n - 1);
}
ll pow_mod(ll x, ll n, ll mod) {
    ll res = 1;
    while (n > 0) {
        if (n & 1) res = (res * x) % mod; //ビット演算(最下位ビットが1のとき)
        x = (x * x) % mod;
        n >>= 1; //右シフト(n = n >> 1)
    }
    return res;
}
ll inv_mod(ll a, ll mod) { //逆元
    ll b = mod, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= mod;
    if (u < 0) u += mod;
    return u;
}
bool is_prime(const unsigned n) {
    switch (n) {
    case 0: // fall-through
    case 1: return false;
    case 2: // fall-through
    case 3: return true;
    } // n > 3 が保証された
    if (n % 2 == 0 || n % 3 == 0) return false;
    for (unsigned i = 5; i * i <= n; i += 6) {
        if (n % i == 0) return false; // (6の倍数)-1
        if (n % (i + 2) == 0) return false; // (6の倍数)+1
    }
    return true;
}

//宣言とか
bool ok;
/*signed*/int main(void) {
    string s;
    cin >> s;
    rep(i, s.size() - 1) {
        if (s[i] == 'h' && s[i + 1] == 'i') {
            ok = true;
            continue;
        }
        else ok = false;
    }
    if (ok) puts("Yes");
    else puts("No");
    return 0;
}
//  [cpp]
#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using ll = long long; 
using ld = long double;
#define endl "\n"
//#define int long long
#define all(V) V.begin(),V.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
const int MOD = 1e9 + 7;
const ll INF = 1LL << 60;
const int inf = 1 << 25;
constexpr long double pi = 3.141592653589793238462643383279;
int dx[] = { 1,0,-1,0 };
int dy[] = { 0,1,0,-1 };
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll fact_mod(ll n, ll mod) {
    ll f = 1; for (int i = 2; i <= n; i++) f = f * (i % mod) % mod;
    return f;
}
ll gcd(ll a, ll b) {
    if (b == 0) return a;
    return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
    return a * b / gcd(a, b);
}
ll keta(ll n) {
    if (n == 0) return 1;
    ll count = 0;
    while (n != 0) {
        n /= 10;
        count++;
    }
    return count;
}
ll ketasum(ll n) {
    ll sum = 0;
    while (n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
ll mch(ll n) {
    if (n == 1) return 1;
    else return n * mch(n - 1);
}
ll pow_mod(ll x, ll n, ll mod) {
    ll res = 1;
    while (n > 0) {
        if (n & 1) res = (res * x) % mod; //ビット演算(最下位ビットが1のとき)
        x = (x * x) % mod;
        n >>= 1; //右シフト(n = n >> 1)
    }
    return res;
}
ll inv_mod(ll a, ll mod) { //逆元
    ll b = mod, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= mod;
    if (u < 0) u += mod;
    return u;
}
bool is_prime(const unsigned n) {
    switch (n) {
    case 0: // fall-through
    case 1: return false;
    case 2: // fall-through
    case 3: return true;
    } // n > 3 が保証された
    if (n % 2 == 0 || n % 3 == 0) return false;
    for (unsigned i = 5; i * i <= n; i += 6) {
        if (n % i == 0) return false; // (6の倍数)-1
        if (n % (i + 2) == 0) return false; // (6の倍数)+1
    }
    return true;
}

//宣言とか
bool ok;
/*signed*/int main(void) {
    string s;
    cin >> s;
    rep(i, s.size() - 1) {
        if (s[i] == 'h' && s[i + 1] == 'i') ok = true;
    }
    if (ok) puts("Yes");
    else puts("No");
    return 0;
}
//  [cpp]
#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); ++i)
//#define DEBUG
#ifdef DEBUG
#define DEBUG_PRINT(fm, ...) do{std::printf("%s:%d(%s)", __FILE__, __LINE__, __func__);std::cout << "DEBUG PRINT ";std::printf(fm, __VA_ARGS__);}while(0)
#define DEBUG_VAL(a, b) do{std::printf("%s:%d(%s)", __FILE__, __LINE__, __func__);std::cout <<"DEBUG VAL " << a << ":" << b << endl;}while(0)
#else
#define DEBUG_PRINT(...)do{}while(0);
#define DEBUG_VAL(a, b)do{}while(0);
#endif

using namespace std;
using ll = long long;
using v1 = vector<int>;
using vl = vector<long long>;
using v2 = vector<vector<int>>;
using v3 = vector<vector<char>>;
int main(){
    string s;
    cin >> s;
    if(s.size() <2){
        cout << "No" << endl;
        return 0;
    }
    string an = ""; 
    for(int i = 0; i < s.size(); i++){
        if(i%2 == 0) an += "h";
        else an += "i";
    }
    if(s == an) cout << "Yes" << endl;
    else cout << "No" << endl;
}
//  [c]
#include<stdio.h>
#include<string.h>
int main(){
    char s[11];
    scanf("%s",s);
    int p=strlen(s);
    if(p%2!=0){
        puts("No");
        return 0;
    }
    for(int i=0;i<p-1;){
        if(s[i]=='h'&&s[i+1]=='i'){
            i+=2;
        }
        else{
            puts("No");
            return 0;
        }
    }
    puts("Yes");
    return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int main(){

	int n;
	char s[1][10];

	scanf("%s", s[0]);

	n = strlen(s[0]);

	int state = 1;
	if(n % 2 == 0) {
		for(int i = 0; i < n - 1; i+= 2) {
			if(s[0][i] == 'h' && s[0][i+1] == 'i') {
				state = 1;
			} else {
				state = 0;
			}
		}
	} else {
		state = 0;
	}

	if(state == 0) {
		printf("No\n");
	} else {
		printf("Yes\n");
	}
	return 0;

}
//  [c]
#include <stdio.h>
#include<string.h>
int main()
{
    char s[15];
    scanf("%s",s);
    int l=strlen(s);
    if(l%2)
    printf("No\n");
    else
    {
        int flag=1,i=0;
        while(i<l)
        {
            if(s[i]!='h'||s[i+1]!='i')
            {
                flag=0;
                break;
            }
            i+=2;
        }
        if(flag==1)
        printf("Yes\n");
        else
        printf("No\n");
    }
}
//  [c]
#include<stdio.h>
#include<string.h>

int main() {
	char s[11];
	scanf("%s", s);
	int flag = 0;
	for (int i = 0; i < strlen(s); i++) {
		if (strlen(s) == 1) { printf("No"); return 0; }
		if (i % 2 == 0) {
			if (s[i] != 'h') {
				printf("No");
				return 0;
			}
		}
		else if (s[i] != 'i') {
			printf("No");
			return 0;
		}
	}
	printf("Yes");

	return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>

int main() {
	char s[11];
	scanf("%s", s);
	int flag = 0;
	for (int i = 0; i < strlen(s); i++) {
		if (i % 2 == 0) {
			if (s[i] != 'h') {
				printf("No");
				return 0;
			}
		}
		else if (s[i] != 'i') {
			printf("No");
			return 0;
		}
	}
	printf("Yes");

	return 0;
}
//  [c]
#include<stdio.h>

int main()
{
  char s[11];
  scanf("%s",s);

  if(s == "hi"){
    puts("Yes");
    return 0;
  }
  if(s == "hihi"){
    puts("Yes");
    return 0;
  }
  if(s == "hihihi"){
    puts("Yes");
    return 0;
  }
  if(s == "hihihihi"){
    puts("Yes");
    return 0;
  }
  if(s == "hihihihihi"){
    puts("Yes");
    return 0;
  }  
  

}
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
  input = input.split("\n");
  tmp = input[0]
  ans = tmp.replace(/hi/g,'')
  if(ans.length == 0){
    console.log('Yes')
  }else{
    console.log('No')
  }

}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'

const main = (arg) => {
  const S = arg.split('\n')[0]

  if (S.split('hi').filter(v => v).length == 0) {
    console.log('Yes')
  } else {
    console.log('No')
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
const main = (inputs) => {
  const word = inputs[0];
  var flag = true;
  for (var i = 0; i < word.length; i++) {
    var count = 0;
    if (i % 2 === 0 && word[i] === 'h') {
      count = count + 1;
    }
    if (i % 2 === 1 && word[i] === 'i') {
      count = count + 1;
    }
    if (count === 0) {
      flag = false;
      break;
    }
  }
  if (flag && word.length % 2 === 0) {
    console.log('Yes');
  } else {
    console.log('No');
  }
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));
//  [javascript]
function myin(){return require("fs").readFileSync("/dev/stdin", "utf8").trim();}

//0:何もしない  1:数値へ変換  2:半角SPで分割  3:改行で分割  4:半角SPで分割し、数値配列へ
//5:改行で分割し、数値配列へ  6:1文字に分割  7:1文字に分割し、数値配列へ
function myconv(i, no){
  switch(no){
    case 0: return i;
    case 1: return parseInt(i);
    case 2: return i.split(" ");
    case 3: return i.split("\n");
    case 4: return i.split(" ").map((a)=>Number(a));
    case 5: return i.split("\n").map((a)=>Number(a));
    case 6: return i.split("");
    case 7: return i.split("").map((a)=>Number(a));
  }}

function Main(input) {
  input = myconv(input, 3);
  const A = myconv(input[0], 4)[0];
  const B = myconv(input[0], 4)[1];
  const M = myconv(input[0], 4)[2];
  const a = myconv(input[1], 4);
  const b = myconv(input[2], 4);
  input.shift();
  input.shift();
  input.shift();
  let price = [];
  for(let i = 0; i < A; i++) {
    for(let j = 0; j < B; j++) {
      let p = a[i] + b[j];
      price.push(p);
    }
  }
  len = input.length;
  for(let i = 0; i < len; i++){
    let x = myconv(input[i], 4)[0];
    let y = myconv(input[i], 4)[1];
    let c = myconv(input[i], 4)[2];

    let k = (x-1)*B + y - 1;
    const origin_p = price[k];
    price.push(price[k] - c);
  }
  console.log(Math.min.apply(null, price));
}
Main(myin());
//  [javascript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split('');
   let len = xs.length;
   let ans = 0;

    for(let i =0; i<=len; i++) {
       if(i%2==0 && xs[i]=='h') {
       	ans+=1;
       }else if(i%2==1 && xs[i]=='i'&&xs[i+1]!='i'){
        ans+=1;
       }else{
        ans+=0;
       }
    }
    if(ans>=2){
    console.log('Yes');
    }else{
    console.log('No');
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [javascript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split('');
   let len = xs.length;
   let ans = 0;

    for(let i =0; i<=len; i++) {
       if(i%2==1 && xs[i]=='h'&&[i+1]!='h') {
       	ans+=1;
       }else if(i%2==0 && xs[i]=='i' &&xs[i+1]!='i'){
        ans+=1;
       }else{
        ans+=0;
       }
    }
    if(ans>=2){
    console.log('Yes');
    }else{
    console.log('No');
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextString() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func main() {
	S := nextString()

	ans := false
	hitachi := ""
	for i := 1; i <= 5; i++ {
		hitachi += "hi"
		if hitachi == S {
			ans = true
		}
	}

	if ans {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
  "fmt"
  "regexp"
)

func main() {
  var s string
  fmt.Scan(&s)
  r := regexp.MustCompile(`^(hi)+$`)
  if r.MatchString(s) {
    fmt.Println("Yes")
  } else {
    fmt.Println("No")
  }
}
//  [go]
package main

import "fmt"

func main() {
	// Code for A - Hitachi String
	var S string
	fmt.Scanf("%s", &S)

	var ans string
	for i := 0; i < len(S); i++ {
		if i%2 == 0 {
			ans += "h"
		} else {
			ans += "i"
		}
	}

	if S == ans {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
  "fmt"
  "strings"
)

func main() {
  var s string
  fmt.Scanf("%s", &s)
  
  ans := "No"
  if strings.Contains(s, "hi") {
    ans = "Yes"
  }
  fmt.Printf("%s\n", ans)
}
//  [ruby]
S = gets.chomp
if S.length.even?
    puts S=="hi" * (S.length/2) ? "Yes" : "No"
else
    puts "No"
end
//  [ruby]
S = gets.chomp

if S.length % 2 == 1 then
  print "No"
else
  ans = "Yes"
  for j in 1..S.length / 2 do
    if S[2 * j-2] != "h" or S[2*j-1] != "i" then
      ans = "No"
    end
  end
  print ans
end
//  [ruby]
s = gets.chomp

if (s.start_with?("hi") && s.end_with?("hi"))
  puts 'Yes'
else
  puts 'No'
end
//  [ruby]
s = gets.chomp

x = s.length / 2
if s == 'hi' * x
  puts 'Yes'
else
  'No'
end
//  [ruby]
S = gets.chomp

if S.length % 2 == 1 then
  print "No"
else
  ans = "Yes"
  for i in 1..S.length / 2 do
    if S[2i-2] != "h" or S[2i-1] != "i" then
      ans = "No"
    end
  end
  print ans
end
//  [ruby]
require 'set'

def main
    s = gets.chomp

    (0..s.size/2-1).each do |i|
        if s[i*2,2] != "hi"
            puts "No"
            return
        end
    end
    puts "Yes"
end

main

## イディオムなど
# until s.empty? do
#
## 配列のインデックス
# s[0,6] # 0番目から6文字
# s[0..6] # 0番目から6番目まで
# s[5..-1] # 5番目から最後まで
#
## 全探索
# [0, 1].repeated_permutation(n) do |combination| # bit全探索
# array.combination(i) do |selected| # array から要素が i 個である部分列を全部抽出
#
## 無向グラフの幅優先探索(BFS)
# to = Array.new(n).map{Array.new()} # ある頂点と繋がる頂点のリスト
# m.times do
#     a,b = gets.chomp.split(" ").map(&:to_i)
#     to[a].push b
#     to[b].push a
# end
# q = Queue.new # BFS は queue
# ds = Array.new(n, -1)
# pre = Array.new(n, -1)
#
## その他
# a1 = Marshal.load(Marshal.dump(a2)) # 深いコピー
# matrix = Array.new(n).map{Array.new()} # 二次元配列の初期化
#
//  [rust]
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let s: Vec<char> = read::<String>().chars().collect();
    let l = s.len();
    if l % 2 == 1 {
        println!("No");
        return;
    }
    for i in (0 as usize)..l {
        if i % 2 == 0 && s[i] != 'h' {
            println!("No");
            return;
        } else if i % 2 == 1 && s[i] != 'i' {
            println!("No");
            return;
        }
    }
    println!("Yes");
}
//  [rust]
use std::io::stdin;
use std::str::FromStr;
use std::io::prelude::*;

fn main() {
    let s: String = read();

    let his = ["hi", "hihi", "hihihi", "hihihihi", "hihihihihi"];
    let ans = if his.contains(&&s.as_str()) {
        "Yes"
    } else {
        "No"
    };
    println!("{}", ans);
}


fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|b| b.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()

}
//  [rust]
use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;

// reference: http://ir5.hatenablog.com/entry/20171209/1512821837

struct Scanner<'a> {
    cin: StdinLock<'a>,
}
 
impl<'a> Scanner<'a> {
    fn new(cin: StdinLock<'a>) -> Scanner<'a> {
        Scanner { cin: cin }
    }
 
    fn read1<T: FromStr>(&mut self) -> Option<T> {
        let token = self.cin.by_ref().bytes().map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        token.parse::<T>().ok()
    }
 
    fn read<T: FromStr>(&mut self) -> T {
        self.read1().unwrap()
    }
}

use std::mem;
use std::cmp;

fn main() {
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin);

    let h: String = sc.read();
    let mut ok = true;
    for i in 0..h.len() {
        let c = h.chars().nth(i).unwrap();
        if i % 2 == 0 {
            if c != 'h' {
                ok = false
            }
        } else {
            if c != 'i' {
                ok = false
            }
        }
    }

    if ok {
        println!("{}", "Yes")
    } else {
        println!("{}", "No")
    }

}
//  [rust]
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let s: Vec<char> = read::<String>().chars().collect();
    let l = s.len();
    if l.len() % 2 == 1 {
        println!("No");
        return;
    }
    for i in (0 as usize)..l {
        if i % 2 == 0 && s[i] != 'h' {
            println!("No");
            return;
        } else if i % 2 == 1 && s[i] != 'i' {
            println!("No");
            return;
        }
    }
    println!("Yes");
}
//  [rust]
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let s: Vec<char> = read::<String>().chars().collect();
    let l = s.len();
    for i in (0 as usize)..l {
        if i % 2 == 0 && s[i] != 'h' {
            println!("No");
            return;
        } else if i % 2 == 1 && s[i] != 'i' {
            println!("No");
            return;
        }
    }
    println!("Yes");
}
//  [swift]
let message = readLine()!
let check1 = "hi"
let check2 = "hihi"
let check3 = "hihihi"
let check4 = "hihihihi"
let check5 = "hihihihihi"
if message == check1 || message == check2 || message == check3 || message == check4 || message == check5{
  print("Yes")
}else{
  print("No")
}
//  [swift]
let S = readLine()!
var T = ""
var ans = "No"
for _ in 0..<S.characters.count/2 {
  T += "hi"
  if S == T {
    ans = "Yes"
    break
  }
}
print(ans)
//  [swift]
import Foundation
 
 
let n:String=readLine()!
 
if (n=="hi"||n=="hihi"||n=="hihihi"||n=="hihihihi"||n=="hihihihihi"){
   print("Yes")
}else{
   print("No")
}
//  [swift]
let input_line: String = readLine()!

let hitatchistr = "hi"
var s = ""
var exists = false
for i in 0..<5 {
  s += hitatchistr
  if s == input_line {
  	print("YES")
    //return 
    exists = true
  }
}

if exists {
	print("NO")  
}
//  [swift]
let input_line: String = readLine()!

var s = ""
var i = 0
for() {
  
}
//  [swift]
let message = readLine()!
let check1 = "hi"
let check2 = "hihi"
if message == check1 || message == check2{
  print("Yes")
}else{
  print("No")
}
//  [typescript]
import * as fs from 'fs'
import {debug} from '../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8').trim()

const output = (x: string | number | boolean): void => console.log(x)
const splitLine = (string: string): string[] => string.split('\n')
const splitBlank = (string: string): string[] => string.split(' ')
const toNumbers = (array: string[]): number[] => array.map(v => Number(v))
const range = (end: number, start :number = 0): number[] => [...Array(end - start)].map((v, i) => i + start)

// debug(input)

/* ここから */
const S = input
let hitachi = ''
let flag = false
for (const v of range(5)) {
    hitachi += 'hi'
    if (hitachi === S) {
        flag = true
        break
    }
}
flag ? output('Yes') : output('No')
//  [typescript]
// AtCoder Beginner Contest 130
// https://atcoder.jp/contests/hitachi2020
import * as fs from "fs";

const stdin = fs.readFileSync("/dev/stdin", "utf8");
const split = stdin.split("\n");
Main(split);

function Main(inputLines: string[]) {
  const input = inputLines[0];
  const tmp = input.replace(/hi/g, "");
  if (tmp.length < 1) {
    console.log("Yes");
    return;
  }
  console.log("No");
}
//  [typescript]
function Main(input: string) {
  const lines = input.split('\n');
  const length = lines[0].length;
  let result = length != 0;
  let i = 0;
  while (i < length) {
    if (lines[0].charAt(i) !== 'h' || lines[0].charAt(i + 1) !== 'i') {
      result = false;
      break;
    }
    i += 2;
  }
  console.log(result ? 'Yes' : 'No')
}


Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
import * as fs from 'fs'
import {debug} from '../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8').trim()

const output = (x: string | number | boolean): void => console.log(x)
const splitLine = (string: string): string[] => string.split('\n')
const splitBlank = (string: string): string[] => string.split(' ')
const toNumbers = (array: string[]): number[] => array.map(v => Number(v))
const range = (end: number, start :number = 0): number[] => [...Array(end - start)].map((v, i) => i + start)

// debug(input)

/* ここから */
const S = input
S.match('hi') ? output('Yes') : output('No')
//  [typescript]
function Main(input: string) {
  const lines = input.split('\n');
  const length = lines[0];
  let result = length != 0;
  let i = 0;
  while (i < length) {
    if (lines[0].charAt(i) !== 'h' || lines[0].charAt(i + 1) !== 'i') {
      result = false;
      break;
    }
    i += 2;
  }
  console.log(result ? 'Yes' : 'No')
}


Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
function Main(input: string) {
  const length = input.length;
  let result = length != 0;
  let i = 0;
  while (i < length) {
    if (input.charAt(i) !== 'h' || input.charAt(i + 1) !== 'i') {
      result = false;
      break;
    }
    i += 2;
  }
  console.log(result ? 'Yes' : 'No')
}


Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]
a,b,c,d = map(int,input().split())
if a+b>c+d:
  print('Left')
elif a+b<c+d:
  print('Right')
else:
  print('Balanced')
//  [python]
a, b, c, d = map(int, input().split())

if a+b > c+d:
    print('Left')
elif a+b < c+d:
    print('Right')
else:
    print('Balanced')
//  [python]
a, b, c, d = list(map(int, input().split()))

if (a+b) < (c+d):
    print ('Right')
elif (a+b) > (c+d):
    print ('Left')
else:
    print ('Balanced')
//  [python]
A, B, C, D = map(int,input().split())
if A + B < C + D:
  print("Left")
elif A + B == C + D:
  print("Balanced")
else:
  print("Right")
//  [python]
a = list(map(int, input().split()))
a = a[0] + a[1] - a[2] - a[3]
if a < 0:
    print('Left')
elif a > 0:
    print('Right')
else:
    print('Balanced')
//  [python]
a,b,c,d=map(int,input().split())

l=a+b;r=c+d

if l-r<0:
  print('right')
  
elif l>r:
  print('Left')
  
else:
  print('Balanced')
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

class Main
{
	public static void main(String[] args) throws Exception
	{
		invoke(System.in);
//		invoke(new FileInputStream("/tmp/test.txt"));
	}

	public static void	invoke(InputStream is) throws IOException
	{
		// input
		BufferedReader	reader = new BufferedReader(new InputStreamReader(is));
		String	line = reader.readLine();

		String[]	va = line.split(" ");
		int	lsum = Integer.parseInt(va[0]) + Integer.parseInt(va[1]);
		int	rsum = Integer.parseInt(va[2]) + Integer.parseInt(va[3]);

		String	result;
		result =  ((lsum > rsum) ? "Left" : (lsum == rsum) ? "Balanced" : "Right");
		System.out.println(result);

	}

}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {
	private static final int MOD = (int)Math.pow(10, 9);
	public static void main(String[] args) {
		FastReader sc = new FastReader();
		int a = sc.nextInt();
      	int b = sc.nextInt();
      	int c = sc.nextInt();
      	int d = sc.nextInt();
      	
      	String res = "No";
      	
      	if (a + b == c + d) {
      		res = "Balanced";
      	} else if (a + b > c + d) {
      		res = "Left";
      	} else {
      		res = "Right";
      	}
      	
        System.out.println(res);
		
	}
	
	static class FastReader {
	    BufferedReader br;
	    StringTokenizer st;
	
	    public FastReader() {
	      br = new BufferedReader(new InputStreamReader(System.in));
	    }
	  
	    String next() { 
	      while (st == null || !st.hasMoreElements()) {
	        try {
	          st = new StringTokenizer(br.readLine());
	        } catch (IOException  e) {
	          e.printStackTrace();
	        }
	      }
	      return st.nextToken();
	    }
	
	    int nextInt() {
	      return Integer.parseInt(next());
	    }
	
	    long nextLong() {
	      return Long.parseLong(next());
	    }
	
	    double nextDouble() { 
	      return Double.parseDouble(next());
	    }
	
	    String nextLine() {
	      String str = "";
	        try{
	            str = br.readLine();
	        } catch (IOException e) {
	            e.printStackTrace();
	        }
	        return str;
	      }
	  }
}
//  [java]
import java.io.*;
import java.util.*;
class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		//BufferedReader in = new BufferedReader(new FileReader("prob.in"));
		
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		//PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("prob.out")));
		
		StringTokenizer st = new StringTokenizer(in.readLine());
		
		int a = Integer.parseInt(st.nextToken());
		int b = Integer.parseInt(st.nextToken());
		int c = Integer.parseInt(st.nextToken());
		int d = Integer.parseInt(st.nextToken());
		
		int e = a + b;
		int f = c + d;
		
		if(e == f){
			out.println("Balanced");
		}
		else if(e < f){
			out.println("Right");
		}
		else{
			out.println("Left");
		}
		
		
		
		in.close();
		out.close();
		
	}
}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		int left = a + b;
		int right = c + d;

		if (left < right) {
			System.out.println("Left");
		} else if (left > right) {
			System.out.println("Right");
		} else {
			System.out.println("Balanced");
		}


		sc.close();

	}

}