jiahuimbzuai/CoQuIR huggingface dataset:
//  [rust]
#![allow(unused)]

use std::{cell, cmp, collections, fmt, ops};

use cell::{Cell, RefCell};
use cmp::Ordering::{Equal, Greater, Less};
use collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList, VecDeque};
use fmt::{Debug, Display};

// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
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")
    };
}

#[cfg(feature = "debug")]
macro_rules! d {
    ($($args: tt)*) => { dbg!($($args)*) };
}

#[cfg(not(feature = "debug"))]
macro_rules! d {
    ($($args:tt)*) => {};
}

mod num {
    //
}

macro_rules! vmin {
    ($x: expr, $y: expr) => { cmp::min($x, $y) };
    ($x: expr, $($args: expr),*) => { cmp::min($x, vmin!($($args),*)) };
}

macro_rules! vmax {
    ($x: expr, $y: expr) => { cmp::max($x, $y) };
    ($x: expr, $($args: expr),*) => { cmp::max($x, vmax!($($args),*)) };
}

mod bits {
    pub fn is_high(bits: u64, pos: u64) -> bool {
        bits & (1 << pos) != 0
    }
}

fn main() {
    input!(stones_num: usize, pos_num: usize, pos: [i32; pos_num]);

    if stones_num >= pos_num {
        println!("{}", 0);
        return;
    }

    let mut pos = pos;
    pos.sort();

    let mut pos_intervals = pos.windows(2).map(|w| w[1] - w[0]).collect::<Vec<_>>();
    pos_intervals.sort_by(|d1, d2| d2.cmp(&d1));

    let ans = pos_intervals.iter().skip(stones_num - 1).sum::<i32>();

    println!("{}", ans);
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test() {
        //
    }
}
//  [rust]
use proconio::input;

fn main() {
  input! {
    n: usize,
    m: usize,
    mut ms: [isize;m]
  }
  
  if m <= n {
    println!("0");
    return
  }
    
  ms.sort();
  if n == 1 {
    println!("{}", (ms.last().unwrap() - ms.first().unwrap()).abs());
  }
  
  let mut between: Vec<isize> = vec![0;m-1];
  for i in 0..m-1 {
    let v = ms[i];
    between[i] = (ms[i+1] - ms[i]).abs();
  }
  between.sort();
  
  for _ in 0..n-1 {
    between.pop();
  }
  
  println!("{}", between.iter().sum::<isize>());
  
}
//  [rust]
use std::io::*;
use std::str::FromStr;

pub 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 n: usize = read();
    let m: usize = read();

    let mut a: Vec<i64> = vec![];

    for i in 0..m {
        a.push(read());
    }
    a.sort();

    let mut b: Vec<i64> = vec![];
    for i in 1..a.len() {
        b.push(a[i] - a[i - 1])
    }

    b.sort();
    if m - n <= 0 {
        println!("{}", 0);
        return;
    }
    b.split_off(m - n);
    println!("{}", b.iter().sum::<i64>());
}
//  [rust]
use std::io::*;
use std::str::FromStr;

pub 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 n: usize = read();
    let m: usize = read();

    let mut a: Vec<i64> = vec![];

    for i in 0..m {
        a.push(read());
    }
    a.sort();

    let mut b: Vec<i64> = vec![];
    for i in 1..a.len() {
        b.push(a[i] - a[i - 1])
    }

    b.sort();
    b.split_off(m - n);
    println!("{}", b.iter().sum::<i64>());
}
//  [swift]
import Foundation

func readWords<T>(_ f: (Substring) -> T) -> [T] {
    return readLine()!.split(separator: " ").map(f)
}

func main() {
    let nm = readWords { Int($0)! }
    let n = nm[0]
    let m = nm[1]
    
    if n >= m {
        print(0)
        return
    }

    let X = readWords { Int($0)! }.sorted()

    // 区間が得られる。
    // 問題を簡単にしてみる。
    // コマが1つなら答えは X[m-1] - X[0]
    // コマが複数あるなら、訪れない区間ができるのでそのうち一番広い区間を選択すれば良い。
    // コマが2つなら、訪れない区間は1つ。-> 全体から最も広い区間を1つ引く。
    // コマがn個なら、訪れない区間はn-1つ。 -> 全体から広い区間をn-1個引く。

    var distances = (1..<m).map { X[$0] - X[$0-1] }
    distances.sort(by: >)

    print(distances[(n-1)...].reduce(0, +))
}


main()
//  [swift]
// 🐋💭
import Foundation

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

func readInt() -> Int {
    return Int(readLine()!)!
}

func readDoubles () -> [Double] {
    return readLine()!.split(separator: " ").map { Double($0)! }
}

func readDouble() -> Double{
    return Double(readLine()!)!
}
///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}
///最小公倍数を返す
func lcm(_ m:Int, _ n:Int) -> Int {
    return m * n / gcd(m, n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}

// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

//https://riptutorial.com/ja/swift/example/14738/インデックスを知らずに配列から要素を削除する
extension Array where Element: Equatable {
    
    mutating func remove(_ element: Element) {
        _ = firstIndex(of: element).flatMap {
            self.remove(at: $0)
        }
    }
}

func binarySearch(rifgt:Int, key:Int, ary:[String]) -> Int{
    var left = 0
    var right = rifgt
    
    while abs(right - left) > 1 {
        let mid = left + (right - left) / 2
        
        if Int(ary[mid])! < key {
            left = mid
            
        } else {
            right = mid
        }
    }
    return left
}

func arrangement (prev:String, ary:[String], returnVal:[String]) -> [String] {
    var returnVal = returnVal
    if ary.count == 0 {
        returnVal.append(prev)
        return returnVal
    }
    
    for s in ary {
        let wprev = prev + s
        var wary = ary
        wary.remove(s)
        returnVal = arrangement(prev: wprev, ary: wary, returnVal: returnVal)
    }
    return returnVal
}

func main() {
    let nm = readInts()
    let (n, m) = (nm[0], nm[1])
    let aryX = readInts().sorted()
    //＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿ここまで入力
    if n >= m {
        print(0)
        return
    }
    var ans = 0
    var ary = [Int](repeating: 0, count: m - 1)
    for i in 1..<m {
        ary[i - 1] = abs(aryX[i] - aryX[i - 1])
    }
    
    ary.sort(by: >)
    
    for i in n - 1..<ary.count {
        ans += ary[i]
    }
    print(ans)
}
main()
//  [swift]
let input = readLine()!.split(separator: " ").map { Int($0)! }
let N = input[0]
let M = input[1]
let X = readLine()!.split(separator: " ").map { Int($0)! }.sorted()

if N >= X.count {
    print(0)
} else {
    var distances = [Int]()
    for i in stride(from: 0, to: X.count - 1, by: 1) {
        distances.append(abs(X[i] - X[i + 1]))
    }
    print(distances.sorted()[0 ..< distances.count - N + 1].reduce(0, +))
}
//  [swift]
// 🐋💭
import Foundation

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

func readInt() -> Int {
    return Int(readLine()!)!
}

func readDoubles () -> [Double] {
    return readLine()!.split(separator: " ").map { Double($0)! }
}

func readDouble() -> Double{
    return Double(readLine()!)!
}
///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}
///最小公倍数を返す
func lcm(_ m:Int, _ n:Int) -> Int {
    return m * n / gcd(m, n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}

// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

//https://riptutorial.com/ja/swift/example/14738/インデックスを知らずに配列から要素を削除する
extension Array where Element: Equatable {
    
    mutating func remove(_ element: Element) {
        _ = firstIndex(of: element).flatMap {
            self.remove(at: $0)
        }
    }
}

func binarySearch(rifgt:Int, key:Int, ary:[String]) -> Int{
    var left = 0
    var right = rifgt
    
    while abs(right - left) > 1 {
        let mid = left + (right - left) / 2
        
        if Int(ary[mid])! < key {
            left = mid
            
        } else {
            right = mid
        }
    }
    return left
}

func arrangement (prev:String, ary:[String], returnVal:[String]) -> [String] {
    var returnVal = returnVal
    if ary.count == 0 {
        returnVal.append(prev)
        return returnVal
    }
    
    for s in ary {
        let wprev = prev + s
        var wary = ary
        wary.remove(s)
        returnVal = arrangement(prev: wprev, ary: wary, returnVal: returnVal)
    }
    return returnVal
}

func main() {
    let nm = readInts()
    let (n, m) = (nm[0], nm[1])
    let aryX = readInts().sorted()
    //＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿ここまで入力
    var ans = 0
    var ary = [Int](repeating: 0, count: m - 1)
    var i = 0
    
    
    while i < m - 1 && m > 1{
        ary[i] = abs(aryX[i] - aryX[i + 1])
        ans += ary[i]
        i += 1
    }
    
    ary.sort(by: >)
    if m > 1 {
        for i in 0..<n - 1 {
            ans -= ary[i]
        }
    }
    print(ans)
}
main()
//  [typescript]
export class Main {
  static main(input: string): string {
    const tmp = input.split("\n");
    const [n, m] = tmp[0].split(" ").map(Number);
    if (n >= m) {
      return "0";
    }
    const xList = tmp[1].split(" ").slice(0, m).map(Number);
    xList.sort((a, b) => a-b);
    const diffList = [];
    for (let i = 0, len xList.length - 1; i < len; i++) {
      diffList.push(xList[i + 1] - xList[i]);
    }
    diffList.sort((a, b) => a-b);
    let tmp = 0;
    for (let i = 0, len = m - n; i < len; i++) {
      tmp += diffList[i];
    }
    return `${tmp}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8').trim()

let [n, m] = stdin
  .split('\n')[0]
  .split(' ')
  .map(Number)

n = n > m ? m : n

const x = stdin
  .split('\n')[1]
  .split(' ')
  .map(Number)

const ans = () => {
  const sorted = x.sort((a, b) => a - b)

  const diffs = getDiffs(sorted)

  const splitLines = getSplitLines(diffs)

  let count = 0
  for (let i = 0; i < splitLines.length; i++) {
    const begin = splitLines[i]
    const end = i === splitLines.length - 1 ? sorted.length - 1 : splitLines[i + 1] - 1

    count += sorted[end] - sorted[begin]
  }

  console.log(count)
}

const getDiffs = arr => {
  const diffs = []

  for (let i = 1; i < arr.length; i++) {
    const diff = arr[i] - arr[i - 1]

    diffs.push({
      diff,
      index: i,
    })
  }

  return diffs
}

const getSplitLines = diffs => {
  const sDiffs = diffs.sort((a, b) => b.diff - a.diff)

  const splitLines = [0]
  for (let i = 0; i < n - 1; i++) {
    const idx = sDiffs[i].index

    splitLines.push(idx)
  }

  return splitLines
}

ans()
//  [typescript]
namespace Coder {
  class Scanner {
    private buffer: string = '';
    private stdinQueue: any = [];

    constructor() {
      process.stdin.resume();
      process.stdin.setEncoding('utf8');
      process.stdin.on(
        'data',
        (chunk): void => {
          this.buffer += chunk;
          while (this.stdinQueue.length > 0) {
            const i = this.buffer.indexOf('\n');
            if (i < 0) {
              break;
            }
            let line = this.buffer.substr(0, i);
            if (line.endsWith('\r')) {
              line = line.slice(0, -1);
            }
            this.buffer = this.buffer.substr(i + 1);
            this.stdinQueue.shift()(line);
          }
        },
      );
    }
    public getLine(): Promise<string> {
      return new Promise((resolve, reject) => {
        const i = this.buffer.indexOf('\n');
        if (i >= 0 && this.stdinQueue.length == 0) {
          let line = this.buffer.substr(0, i);
          if (line.endsWith('\r')) {
            line = line.slice(0, -1);
          }
          this.buffer = this.buffer.substr(i + 1);
          resolve(line);
        } else {
          this.stdinQueue.push(resolve);
        }
      });
    }

    public close(): void {
      process.stdin.pause();
    }
  }

  async function slove() {
    const sc = new Scanner();
    const [n, m] = (await sc.getLine()).split(' ').map((x) => +x);
    const X = (await sc.getLine()).split(' ').map((x) => +x);
    X.sort((a, b) => {
      if (a > b) return 1;
      else return -1;
    });
    if (m === 1) {
      console.log('0');
    } else {
      const d = [];
      for (let i = 0; i < m - 1; i++) {
        d.push(X[i + 1] - X[i]);
      }
      d.sort((a, b) => {
        if (a > b) return 1;
        else return -1;
      }).reverse();
      const sum = (array: any[]) => {
        return array.reduce((prev, current, i, arr) => {
          return prev + current;
        });
      };
      let ans = sum(d);
      for (let i = 0; i < n - 1; i++) {
        ans -= d[i];
      }
      console.log(ans);
    }

    sc.close();
  }

  slove();
}
//  [python]
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])
//  [python]
S=[input() for _ in range(3)]

i=0
for s in S:
  print(s[i],end='')
  i+=1
//  [python]
a = input()
b = input()
c = input()
print(a[0],b[1],c[2], sep="")
//  [python]
l=input()
l1=input()
l2=input()
a=l[0],l1[1],l2[2]
print(*a)
//  [python]
a,b=map(int,input().split())
print(abs((a-2)*(b-2)))
//  [python]
s1 = input()
s2 = input()
s3 = input()
print(s1[0]+s1[1]+s1[2])
//  [java]
import java.io.*;

public class Main{
  public static void main(String[] args) {
    try {
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
      String a, b, c;
      String d, e, f;

      a = reader.readLine();
      d = a.substring(0, 1);
      b = reader.readLine();
      e = b.substring(1, 2);
      c = reader.readLine();
      f = c.substring(2);

      System.out.println(d + e + f);
      
    }
    catch (Exception e) {
      
    }
  }
}
//  [java]
import java.io.*;
import java.util.*;

public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/4;
    public static final int inf = Integer.MAX_VALUE/4;

    static void solve(InputReader in, PrintWriter out){
        char[][] a = new char[3][3];
        for (int i = 0; i < 3; i++) {
            a[i] = in.ns().toCharArray();
        }
        out.print(a[0][0]);
        out.print(a[1][1]);
        out.println(a[2][2]);
    }

    public static void main(String[] args){
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public Double nd(){
            return Double.parseDouble(ns());
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}
//  [java]
import java.io.*;
import java.util.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
	}

	public static void solution(String[] args) throws Exception{

		String s="";
		for(int i=0;i<3;i++){
			s+=nextString().substring(i,i+1);
		}

		System.out.println(s);

	}
	public static String[] toStringArray(String s) {
		String[] tmp = new String[s.length()];
		char[] c = s.toCharArray();
		for (int i = 0; i < tmp.length; i++) {
			tmp[i] = String.valueOf(c[i]);
		}
		return tmp;
	}

	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}


}
//  [java]
import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String first_line = scanner.nextLine();
		String second_line = scanner.nextLine();
		String third_line = scanner.nextLine();

        System.out.print(first_line.substring(0,1));
        System.out.print(second_line.substring(1,2));
        System.out.print(third_line.substring(2,3));
    }
}
//  [java]


import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

import sun.security.krb5.Asn1Exception;

public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		char a[] = new char[9];

		for (int i = 0; i < 9; i += 3) {
			String input = scan.next();

			a[i] = input.toCharArray()[i];
			a[i + 1] = input.toCharArray()[i + 1];
			a[i + 2] = input.toCharArray()[i + 2];
		}

		String ans = String.valueOf(a[0])
				+ String.valueOf(a[4])
				+ String.valueOf(a[8]);

		System.out.println(ans);

	}

	//***********************以下共通関数************************************************
	/**
	 * 文字列を反転して返す
	 * @param pStr 文字列
	 * @return 反転した文字列
	 */
	public static String myReverse(String pStr) {
		if (pStr.length() < 1) {
			return "";
		}

		StringBuffer sb = new StringBuffer(pStr);
		return sb.reverse().toString();
	}

	/**
	 * 余りを求める。
	 * @param a
	 * @param b
	 * @return 余り。余りがマイナスの時はプラスで返す。
	 */
	public static long myMod(long a, long b) {
		long ret = 0;

		ret = a % b;

		if (ret < 0) {
			ret += b;
		}

		return ret;
	}

	/**
	 * 乗数を求める ※mod対応
	 * @param kisu 基数
	 * @param josu 乗数
	 * @param primeNumMod_0 法 mod値 使わない場合は「0」
	 * @return
	 */
	public static long myPowWithMod(long kisu, long josu, long primeNumMod_0) {

		long ans = 1;

		//乗数が0の場合→1
		if (josu == 0)
			return 1;

		if (primeNumMod_0 == 0) {
			//modを使わないとき

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= kisu;
					josu = josu / 2;
				} else {
					//累乗が奇数の時
					ans *= kisu;
					josu--;
				}
			}

			return ans;

		} else {
			//modを使うとき

			//初めに桁を落とす
			kisu = myMod(kisu, primeNumMod_0);

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= myMod(kisu, primeNumMod_0);
					josu = josu / 2;

				} else {
					//累乗が奇数の時
					ans *= myMod(kisu, primeNumMod_0);
					josu--;

				}
			}

			return myMod(ans, primeNumMod_0);

		}

	}

}
//  [java]


import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

import sun.security.krb5.Asn1Exception;

public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		char a[] = new char[9];

		for (int i = 0; i < 9; i++) {
			a[i] = scan.next().toCharArray()[0];
		}

		String ans = String.valueOf(a[0])
				+ String.valueOf(a[4])
				+ String.valueOf(a[8]);

		System.out.println(ans);

	}

	//***********************以下共通関数************************************************
	/**
	 * 文字列を反転して返す
	 * @param pStr 文字列
	 * @return 反転した文字列
	 */
	public static String myReverse(String pStr) {
		if (pStr.length() < 1) {
			return "";
		}

		StringBuffer sb = new StringBuffer(pStr);
		return sb.reverse().toString();
	}

	/**
	 * 余りを求める。
	 * @param a
	 * @param b
	 * @return 余り。余りがマイナスの時はプラスで返す。
	 */
	public static long myMod(long a, long b) {
		long ret = 0;

		ret = a % b;

		if (ret < 0) {
			ret += b;
		}

		return ret;
	}

	/**
	 * 乗数を求める ※mod対応
	 * @param kisu 基数
	 * @param josu 乗数
	 * @param primeNumMod_0 法 mod値 使わない場合は「0」
	 * @return
	 */
	public static long myPowWithMod(long kisu, long josu, long primeNumMod_0) {

		long ans = 1;

		//乗数が0の場合→1
		if (josu == 0)
			return 1;

		if (primeNumMod_0 == 0) {
			//modを使わないとき

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= kisu;
					josu = josu / 2;
				} else {
					//累乗が奇数の時
					ans *= kisu;
					josu--;
				}
			}

			return ans;

		} else {
			//modを使うとき

			//初めに桁を落とす
			kisu = myMod(kisu, primeNumMod_0);

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= myMod(kisu, primeNumMod_0);
					josu = josu / 2;

				} else {
					//累乗が奇数の時
					ans *= myMod(kisu, primeNumMod_0);
					josu--;

				}
			}

			return myMod(ans, primeNumMod_0);

		}

	}

}
//  [cpp]
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
char s1[5], s2[5], s3[5];

int main() {
	while(~scanf("%s %s %s", s1, s2, s3)) {
		printf("%c%c%c\n", s1[0], s2[1], s3[2]);
	}
	return 0;
}
//  [cpp]
#include<cstdio>

using namespace std;

int main(){
	char s[3][10];
	scanf("%s %s %s", s[0], s[1], s[2]);
	printf("%c%c%c\n", s[0][0], s[1][1], s[2][2]);
	return 0;
}
//  [cpp]
#include <cstdio>

int main(int argc, char const *argv[]) {
    char a[4];
    char b[4];
    char c[4];
    scanf("%s%s%s", a, b, c);
    printf("%c%c%c\n", a[0], b[1], c[2]);
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  for(int i=0;i<3;i++) {
    cin >> s;
    cout << s[i] << endl;
  }
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

int main()
{
    string a[3];
    for (int i = 0; i < 3; i++)
        cin >> a[i];
    string b = a[0].at(0);
    b += a[1].at(1);
    b += a[2].at(2);
    cout << b;
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

int main()
{
    string a[3];
    for (int i = 0; i < 3; i++)
        cin << a[i];
    string b = a[0].at(0);
    b += a[1].at(1);
    b += a[2].at(2);
    cout << b;
    return 0;
}
//  [c]
#include<stdio.h>
int main()
{
    char c[4][4];
    int i;
    for (i = 0; i < 3; i++)
        scanf("%s", &c[i]);
    for (i = 0; i < 3; i++)
        printf("%c", c[i][i]);
    printf("\n");
    return 0;
}
//  [c]
#include<stdio.h>

int main(void){
    char c[3][4];
    int i;
    for(i=0;i<3;i++){
        scanf("%s",c[i]);
    }
    printf("%c%c%c\n",c[0][0],c[1][1],c[2][2]);
    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>

int main() {

    char c1[4];
    char c2[4];
    char c3[4];

    scanf("%s %s %s", c1, c2, c3);

    printf("%c", c1[0]);
    printf("%c", c2[1]);
    printf("%c", c3[2]);


    return 0;

}
//  [c]
#include<stdio.h>
int main()
{
    char A[3][3];
    int i,j, p, q;
    for(i=0; i<3; i++)
    {
        for(j=0;j<3;j++)
        {
            scanf("%c", &A[i][j]);
        }
    }

    for(p=0; p<3; p++)
    {
        printf("%c", A[p][p]);
    }

    return 0;

}
//  [c]
#include<bits/stdc++.h>
using namespace std;
int main()
{
  char mat[3][3];
  int i,j;
  for(i=0;i<3;i++)
  {
    for(j=0;j<3;j++)
    {
      cin>>mat[i][j];
    }
  }
  string s ="";
  s=s+mat[0][0]+mat[1][1]+mat[2][2];
  cout<<s;
  return 0;
}
//  [c]
#include<stdio.h>

typedef struct {
	char m_aLetter[4];
}Squares_t;

void DisplayLetter(Squares_t* a_pstSquares);

int main(void) {
	//構造体変数の定義
	Squares_t astSquares[3];

	//変数に文字を入力
	scanf("%s", &astSquares[0].m_aLetter);
	scanf("%s", &astSquares[1].m_aLetter);
	scanf("%s", &astSquares[2].m_aLetter);
	
	DisplayLetter(&astSquares);

	return 0;
}

/**********
*3行3列に並んだアルファベットの中で左上、中央、右下の3つを順番に表示する関数
*　Squares_t* a_pstSquares　入力される文字の構造体
*/
void DisplayLetter(Squares_t* a_pstSquares) {
	int i;
	printf("\n");
	//並んだアルファベットの中で左上、中央、右下の3つを順番に表示
	for (i = 0; i < 3; i++) {
		printf("%c", a_pstSquares[i].m_aLetter[i]);
	}
	printf("\n");

	return 0;
}
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const L1 = arg[0].split("");
    const L2 = arg[1].split("");
    const L3 = arg[2].split("");
    
    console.log(L1[0] + L2[1] + L3[2]);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main (input) {
  input = input.split('\n');
  console.log(input[0][0]+input[1][1]+input[2][2]);
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
s = ''
for (i=0; i<3; i++) {
    s += inp[i][i]
}
console.log(s)
//  [javascript]
"use strict"

const Main=(input)=>{
  console.log(input)
  
  const Array=input.trim().split(/\n/)
  const Array1=Array[0].split(/\D/)
  const Array2=Array[1].split(/\D/)
  const Array3=Array[2].split(/\D/)
  const Answer=`${Array1[0]}${Array2[1]}${Array3[2]}`

  console.log(Answer)
}


Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
"use strict"

const Main=(input)=>{
  console.log(input)
  
  const Array=input.trim().split(/\n/)
  const Array1=Array[0].split(/./)
  const Array2=Array[1].split(/./)
  const Array3=Array[2].split(/./)
  const Answer=`${Array1[0]}${Array2[1]}${Array3[2]}`

  console.log(Answer)
}


Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
    console.log(input[0][0]+input[1][1]+input[2][2])
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

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

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

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

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

// min, max, asub, absなど基本関数
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func asub(a, b int) int {
	if a > b {
		return a - b
	}
	return b - a
}

func abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func lowerBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int, x int) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

func main() {
	sc.Split(bufio.ScanWords)
	c0 := getString()
	c1 := getString()
	c2 := getString()

	out(string(c0[0]) + string(c1[1]) + string(c2[2]))
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var a, b, c string
	fmt.Scan(&a, &b, &c)
	fmt.Printf("%s%s%s", a[0:1], b[1:2], c[2:3])
}
//  [go]
package main

import (
	. "fmt"
)

// func init() { Println("----------------------------------------") }

func main() {
    var s1, s2, s3 string
    Scanf("%s", &s1)
    Scanf("%s", &s2)
    Scanf("%s", &s3)

    Print(string(s1[0]), string(s2[1]), string(s3[2]))
}
//  [go]
package main

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

func main() {
  var c [3][3]int

  scanner := bufio.NewScanner(os.Stdin)
  count := 0
  for scanner.Scan() {
    line := scanner.Text()
    c[count][0], _ = strconv.Atoi(string(line[0]))
    c[count][1], _ = strconv.Atoi(string(line[1]))
    c[count][2], _ = strconv.Atoi(string(line[2]))
    count++
    if count == 3 {
      break
    }
  }
  fmt.Printf("%d%d%d\n", c[0][0], c[1][1], c[2][2])
}
//  [go]
package main

import(
    "fmt"
)



func main() {
    var a,b,c int
    fmt.Scan(&a,&b,&c)
    fmt.Printf("%c%c%c",a[0],b[1],c[2])
}





func abs32(a int) int {
    if a<0{
        return -a
    }
    return a
}

func abs64(a int64) int64 {
    if a<0{
        return -a
    }
    return a
}

func min32(a, b int) int {
    if a >= b {
        return b
    }
    return a
}

func max32(a, b int) int {
    if a >= b {
        return a
    }
    return b
}

func min64(a, b int64) int64 {
    if a >= b {
        return b
    }
    return a
}

func max64(a, b int64) int64 {
    if a >= b {
        return a
    }
    return b
}

func gcd(a, b int64) int64 {
    if a % b == 0 {
        return b
    } else {
        return gcd(b, a%b)
    }
}

func lcm(a, b int64) int64 {
    return a / gcd(a, b) * b
}

func scanNums(len int) (nums []int){
    var num int
    for i:=0; i<len; i++{
        fmt.Scan(&num)
        nums = append(nums,num)
    }
    return
}

func scanNums64(len int) (nums []int64){
    var num int64
    for i:=0; i<len; i++{
        fmt.Scan(&num)
        nums = append(nums,num)
    }
    return
}

func scanString(len int) (str []string){
    var s string
    for i:=0; i<len; i++{
        fmt.Scan(&s)
        str = append(str,s)
    }
    return
}

func scanTwoNums(n,m int) ([][]int){
    Nums := make([][]int, n)
    for i:=0; i<n; i++{
        Nums[i] = make([]int, m)
    }
    return Nums
}
//  [go]
package main

import "fmt"

func main(){
  ls = make([]string, 9)
  for i:=0; i < 9; i++{
    fmt.Scan(&ls[i])
  }
  fmt.Println(ls[0] + ls[3] + ls[8])
}
//  [ruby]
a,b,c=3.times.map{gets.chomp}
puts a[0] + b[1] + c[2]
//  [ruby]
s1 = gets
s2 = gets
s3 = gets
puts s1[0]+s2[1]+s3[2]
//  [ruby]
c = Array.new(3) { gets.chomp.chars }
puts c[0][0] + c[1][1] + c[2][2]
//  [ruby]
a = gets.chomp.to_s
b = gets.chomp.to_s
c = gets.chomp.to_s

ar1 = [a, a, a]
ar2 = [b, b, b]
ar3 = [c, c, c]

puts ar1.slice(0) && ar2.slice(1) && ar3.slice(2)
//  [ruby]
c1 = gets.split(" ").map(&:to_s)
c2 = gets.split(" ").map(&:to_s)
c3 = gets.split(" ").map(&:to_s)
puts c1[0] + c2[1] + c3[2]
//  [ruby]
first = gets.chomp.split("")
second = gets.chomp.split("")
third = gets.chomp.split("")

puts first.fisrt + second[1] + third.last
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($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: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! {
        c: [chars;3]
    }
    let v = vec![c[0][0],c[1][1],c[2][2]];
    println!("{}",
        v.into_iter().collect::<String>());
}
//  [rust]
fn main(){
    let mut c1 = String::new();
    let mut c2 = String::new();
    let mut c3 = String::new();

    std::io::stdin().read_line(&mut c1);
    std::io::stdin().read_line(&mut c2);
    std::io::stdin().read_line(&mut c3);

    println!("{}{}{}",c1.remove(0),c2.remove(1),c3.remove(2));
}
//  [rust]
use std::io;

fn main() {
	let mut v:Vec<char> = Vec::new();
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let s:Vec<char> = buf.trim().chars().collect();
	v.push(s[0]);
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let s:Vec<char> = buf.trim().chars().collect();
	v.push(s[1]);
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let s:Vec<char> = buf.trim().chars().collect();
	v.push(s[2]);
	for i in v{
		print!("{}", i);
	}
	println!("");
}
//  [rust]
#[allow(unused_imports)]
use itertools::Itertools;
#[allow(unused_imports)]
use num::*;
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;
#[allow(unused_imports)]
use std::collections::*;

fn main() {
  input! {
    grid: [Chars; 3]
  };

  let res = format!("{}{}{}", grid[0][0], grid[1][1], grid[2][2]);
  println!("{}", res);
}
//  [rust]
use std::str::FromStr;
use std::fmt::Debug;

fn read_line<T>() -> Vec<T>
    where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()
}

fn main() {

    for i in 0..3 {
        let x:String = read_line();
        println!("{}", x.chars().nth(i).unwrap());
    }
}
//  [rust]
fn read_line() -> String {
    let mut in_str = String::new();
    io::stdin().read_line(&mut in_str).unwrap();
    return in_str.trim().to_string();
}

fn main() {

    for i in 0..3 {
        println!("{}", read_line().chars().nth(i).unwrap());
    }
}
//  [swift]
var s="";for i in 0..<3{s+=readLine()!.characters.map{String($0)}[i]};print(s)
//  [swift]
let rd = 10000//Int(readLine()!)!
func sumDigits(_ num: Int) -> Int {
  var num = num
  var sum = 0
  while num > 0 {
    sum += num%10
    num /= 10
  }
  return sum
}

var min = 100
for i in 1 ... rd/2+1 {
  var j = rd - i
  if sumDigits(i) + sumDigits(j) < min {
    min = sumDigits(i) + sumDigits(j)
  }
}
print(min)
//  [swift]
let rd = Int(readLine()!)!
func sumDigits(_ num: Int) -> Int {
  var num = num
  var sum = 0
  while num > 0 {
    sum += num%10
    num /= 10
  }
  return sum
}

var min = 100
for i in 1 ... rd {
  var j = rd - i
  if i + sumDigits(j) < min {
    min = i + sumDigits(j)
  }
}
print(min)
//  [swift]
var s="";for i in 0..<3{s+=readLine()!.characters.map{$0}[i]};print(s)
//  [typescript]
const main = (input) => {
  input = input.split('\n');
  const A = input[0];
  const B = input[1];
  const C = input[2];
  
  console.log(A[0]+B[1]+C[2]);
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  out(sin()[0]+sin()[1]+sin()[2])
}
main()
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const [...row] = stdin.split('\n').filter(e=>e).map(e=>e.split(''))

console.log(`${row[0][0]}${row[1][1]}${row[2][2]}`)
//  [typescript]
import * as fs from "fs";
const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split(/\n/);
console.log(input[0].charAt(0), input[1].charAt(1), input[2].charAt(2));
//  [typescript]
import * as fs from "fs";
const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split(/\n/);
var ret = "";
for (let index = 0; index < input.length; index++) {
  ret += input[index].split("")[index];
}
console.log(ret);
//  [python]
N = input()
Ninv = N[::-1]
if N == Ninv:
	print("Yes")
else:
	print("No")
//  [python]
n = input()
print("Yes" if n == n[::-1] else "No" )
//  [python]
n = int(input())
m = n //100
l = n %10

if m==l:
    print("Yes")
else:
    print("No")
//  [python]
a = input()
b = ""
for i in range(len(a)):
    b += a[i]
if a == b:
    print("Yes")
else:
    print("No")
//  [python]
a = int(input())
if a == a[::-1]:
  print('Yes')
else:
  print('No')
//  [java]
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] N = sc.next().toCharArray();

		System.out.println(N[0] == N[2] ? "Yes" : "No");
	}

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	public static class Scanner {
		private BufferedInputStream inputStream;
		private StringBuilder buffer = new StringBuilder();

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;
			int sign = 1;

			int read = skip();
			if (read == '-') {
				sign = -1;
				read = inputStream.read();
			}

			do {
				num = num * 10 + sign * (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;
			int sign = 1;

			int read = skip();
			if (read == '-') {
				sign = -1;
				read = inputStream.read();
			}

			do {
				num = num * 10 + sign * (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			int read = skip();
			do {
				buffer.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			String text = buffer.toString();
			buffer.delete(0, buffer.length());

			return text;
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * author @sahil
 */
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int p=n;
        int s=0;
        while(n!=0){
            int r=n%10;
            s=s*10+r;
            n=n/10;
        }
        if(p==s) System.out.println("Yes");
        else System.out.println("No");
    }
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String x = br.readLine();
		System.out.println(x.charAt(0) == x.charAt(2) ? "Yes" : "No");

	}
}
//  [java]
import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
		ArrayList<String> one = nextCharArray();
      int L = one.get(0);
      int R = one.get(2);
      myout((L.equals(R)) ? "Yes" : "No");
      
	}
	//Method addition frame start



	//Method addition frame end
}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String n = sc.next();
		
		System.out.println(new StringBuffer(n).reverse().equals(n) ? "Yes" : "No");

		sc.close();

	}

}
//  [java]


import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws IOException {

		Scanner scan = new Scanner(System.in);

		int N = scan.nextInt();

		int one = N % 10;

		int hundered = N % 100;

		if (one == hundered) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

	//***********************以下共通関数************************************************
	/**
	 * 文字列を反転して返す
	 * @param pStr 文字列
	 * @return 反転した文字列
	 */
	public static String myReverse(String pStr) {
		if (pStr.length() < 1) {
			return "";
		}

		StringBuffer sb = new StringBuffer(pStr);
		return sb.reverse().toString();
	}

	/**
	 * 余りを求める。
	 * @param a
	 * @param b
	 * @return 余り。余りがマイナスの時はプラスで返す。
	 */
	public static long myMod(long a, long b) {
		long ret = 0;

		ret = a % b;

		if (ret < 0) {
			ret += b;
		}

		return ret;
	}

	/**
	 * 乗数を求める ※mod対応
	 * @param kisu 基数
	 * @param josu 乗数
	 * @param primeNumMod_0 法 mod値 使わない場合は「0」
	 * @return
	 */
	public static long myPowWithMod(long kisu, long josu, long primeNumMod_0) {

		long ans = 1;

		//乗数が0の場合→1
		if (josu == 0)
			return 1;

		if (primeNumMod_0 == 0) {
			//modを使わないとき

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= kisu;
					josu = josu / 2;
				} else {
					//累乗が奇数の時
					ans *= kisu;
					josu--;
				}
			}

			return ans;

		} else {
			//modを使うとき

			//初めに桁を落とす
			kisu = myMod(kisu, primeNumMod_0);

			while (josu > 0) {

				if (josu % 2 == 0) {
					//累乗が偶数の時

					kisu *= myMod(kisu, primeNumMod_0);
					josu = josu / 2;

				} else {
					//累乗が奇数の時
					ans *= myMod(kisu, primeNumMod_0);
					josu--;

				}
			}

			return myMod(ans, primeNumMod_0);

		}

	}

}
//  [cpp]
#include<stdio.h>
int main(){
	char s[99];
	scanf("%s",s);
	puts(s[0] == s[2] ?"Yes" :"No");
	return 0;
}