jiahuimbzuai/CoQuIR huggingface dataset:
//  [swift]
let array = [ 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51 ]
let input_line: Int = Int(readLine()!)!
let number = input_line - 1
print(array[number])
//  [swift]
let Karray=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
let Kline:Int = Int(readLine()!)!
print(Karray[Kline-1])
//  [swift]
import Foundation

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

func main() {
    let aryK = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    
    print(aryK[readInt()-1])
}
main()
//  [swift]
func readInts() -> [Int]{
    readLine()!.split(separator: " ").map { Int($0)! }
}

func main(){
    let abc = readInts()
    
    if 4*abc[0]*abc[1] < (abc[2]-abc[0]-abc[1])*(abc[2]-abc[0]-abc[1]) && abc[0]+abc[1]<abc[2]{
        print("YES")
        return
    }
    print("NO")
}

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

func main(){
    let abc = readInts()
    
    if 4*abc[0]*abc[1] < (abc[2]-abc[0]-abc[1]^2) && abc[0]+abc[1]<abc[2]{
        print("YES")
        return
    }
    print("NO")
}

main()
//  [swift]
let Karray=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
let Kline:Int = Int(readline()!)!
print(Karray[Kline-1])
//  [typescript]
function main(input) {
    const lines = input.split("\n");
    const K = +lines[0];

    const array = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51];
    
    console.log(array[K-1]);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
// @ts-ignore
const main = (input: string) => {
  const list = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51];

  console.log(list[Number(input) - 1]);
}

// *この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
export class Main {
  static main(input: string): string {
    const a: number[] = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51];
    const tmp: string[] = input.split("\n");
    const k: number = parseInt(tmp.shift().split(" ")[0]);
    return `${a[k - 1]}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
A = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(A[K - 1])
//  [python]
C1 = input()
C2 = input()
print("YES" if C1[::-1] == C2 else "NO")
//  [python]
a = input()
b = input()
if a == b[::-1]:
    print("YES")
else:
    print("NO")
//  [python]
a = str(input())
b = str(input())
if a[::-1] == b:
  print("YES")
else:
  print("NO")
//  [python]
x = input()
y = input()
if x[::-1] = y:
	print('YES')
else:
	print('NO')
//  [python]

C =str(input())


if C[0] == C[5] and C[1] == C[4] and C[2] == C[3]:
    print('Yes')

else:
    print('No')
//  [python]

C1 =str(input())
C2 =str(input())

if C1[0] == C2[2] and C1[1] == C2[1] and C1[2] == C2[0]:
    print('Yes')

else:
    print('No')
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			@SuppressWarnings("unused")
			String top = br.readLine();
			String down = br.readLine();

			char[] topTmp = top.toCharArray();
			char[] downTmp = down.toCharArray();

			char[] turnDown = new char[top.length()];
			char[] turnTop = new char[top.length()];

			for (int i = 0; i < top.length(); i++) {
				turnDown[i] = topTmp[top.length() - 1 - i];
				turnTop[i] = downTmp[top.length() - 1 - i];
			}

			if (top.equals(new String(turnTop)) && down.equals(new String(turnDown))) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}

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

public class Main {

    public static void main(String[] args) throws Exception {
        InputReader in = new InputReader(System.in);
//        InputReader in = new InputReader(new FileInputStream("/Users/KeFA/projects/competitve/src/main/java/input.txt"));
        PrintWriter out = new PrintWriter(System.out);

        while (in.ready()) {
            String s1 = in.next();
            String s2 = in.next();
            if (s1.charAt(0) == s2.charAt(2) && s1.charAt(1) == s2.charAt(1) && s1.charAt(2) == s2.charAt(0)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
        out.flush();
        out.close();
    }

    private static class InputReader {
        StringTokenizer st;
        BufferedReader br;

        public InputReader(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++)
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }
    }
}
//  [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{

		char[] c1 = nextString().toCharArray();
		char[] c2 = nextString().toCharArray();
		String ans = "NO";
		if(c1[0]==c2[2]&&c1[2]==c2[0]&&c1[1]==c2[1])
			ans="YES";
		System.out.println(ans);

	}
	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.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        String list1[] = s1.split("");
        String list2[] = s2.split("");
        String ans = "";
        if(list1[0].equals(list2[2]) && list1[1].equals(list2[1]) && list1[2].equals(list2[0])){
            ans = "Yes";
            System.out.println(ans);
        }else{
            ans = "No";
            System.out.println(ans);
        }
        
    }
}
//  [java]
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s1 = sc.nextLine();
        String s2 = sc.nextLine();
        String list1[] = s.split("");
        String list2[] = s.split("");
        String ans = "";
        if(list1[0].equals(list2[2]) && list1[1].equals(list2[1] && list1[2].equals(list2[0]))){
            String ans = "Yes";
            System.out.println(ans);
        }else{
            String ans = "No";
            System.out.println(ans);
        }
        
    }
}
//  [java]
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		String s1 = scn.next();
      	String s2 = scn.next();
      	String[] list1 = s1.split("");
      	String[] list2 = s2.split("");
      	String ans = "NO";
      	if(list1[0].equals(list2[5]) && list1[1].equals(list2[4]) && list1[2].equals(list2[3])) ans = "YES";
      	System.out.println(ans);
	}
}
//  [cpp]
#include<stdio.h>

int main(void){
  char a[4];
  char b[4];

  scanf("%s",a);
  scanf("%s",b);

  
  if((a[0]==b[2])&&(a[1]==b[1])&&(a[2]==b[0])){
    printf("YES\n");
  }else{
    printf("NO\n");
  }

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

int main() {
	char str[2][3];
	scanf("%s",str[0]);
	scanf("%s",str[1]);
	if(str[0][0]==str[1][2] && str[0][1]==str[1][1] && str[0][2]==str[1][0]) printf("YES\n");
	else  printf("NO\n");
	return 0;
}
//  [cpp]
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<cstdlib>
using namespace std;
int main(){
	int i,j;
	char a[2][3];
	for (i=0;i<2;i++){
		scanf ("%s",a[i]);
	}
	for (i=0,j=2;i<3;j--,i++){
		if (a[0][i]!=a[1][j]){
			printf ("NO\n");
			return 0;
		}
	}
	printf ("YES\n");
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

char c[6][6];

int main () {
	for (int i = 0; i < 2; i++){
		for (int j = 0; j < 3; j++){
			cin >> c[i][j];
		}
	}
	if (c[0][1] == c[1][1]){
		if (c[0][0] == c[1][2]){
			if (c[0][2] == c[1][0]){
				cout << "YES";
			}
		}
	} else {
		cout << "NO";
	}
}
//  [cpp]
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <string>
using namespace std;

int main()
{
	int ans, n;
	string s,c;
	cin >> s >> c;
	reverse(s.begin(), s.end());

	if (s == c) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}

	cout << ans << endl;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    string s1, s2;
    cin >> s1 >> s2;
    int cnt = 0;
    for (int i = 0; i < 3; ++i) {
        for (int j = 2; j >= 0; --j) {
            if (s1[i] == s2[j]) {
                cnt++;
            }
        }
    }

    if (cnt == 3) {
        cout << "YES" << "\n";
    } else {
        cout << "NO" << "\n";
    }


}
//  [c]
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#define pai 3.1415926535


int main(void) {
	
	char a[4], b[4];
	scanf("%s %s", a, b);
	if (a[0] == b[2] && a[1] == b[1] && a[2] == b[0]) {
		printf("YES");
	}
	else {
		printf("NO");
	}


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

int main(){
char str[50] ,str2[50] ;
scanf("%s%s",&str,&str2);
    if(str[0] == str2[2] && str[2]==str2[0] && str[1] ==str2[1]){

    printf("YES");
    }else{
        printf("NO");
    }
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
int fun(char *,char *);
int fun(char *s1,char *s2)
{
    if(s1[0]!=s2[2]||s1[1]!=s2[1]||s1[2]!=s2[0])
    {return 0;}
    return 1;
}
int main()
{
    char a[4];
    char b[4];
    scanf("%s%s",a,b);
    printf((fun(a,b)==1)?"YES\n":"NO\n");
    return 0;
}
//  [c]
#include<stdio.h>
int main(void){
	int i=0;
	char c[2][3];
	scanf("%c%c%c",&c[0][0],&c[0][1],&c[0][2]);
	scanf("%c%c%c",&c[1][0],&c[1][1],&c[1][2]);
	if(c[0][0]==c[1][2]){
		if(c[0][1]==c[1][1]){
			if(c[0][2]==c[1][0]){
				i=1;
			}
		}
	}
	if(i==1){
		printf("YES\n");
	}else{
		printf("NO\n");
	}
	return 0;
}
//  [c]
#include<stdio.h>
int main(void){
	int i=0;
	char c[2][3];
	scan("%s%s%s",&c[0][0],&c[0][1],&c[0][2]);
	scan("%s%s%s",&c[1][0],&c[1][1],&c[1][2]);
	if(c[0][0]==c[1][2]){
		if(c[0][1]==c[1][1]){
			if(c[0][2]==c[1][0]){
				i=1;
			}
		}
	}
	if(i==1){
		printf("YES\n");
	}else{
		printf("NO\n");
	}
	return 0;
}
//  [c]
#include<stdio.h>
int main(void){
	int i=0;
	char c[2][3];
	scanf("%s%s%s",&c[0][0],&c[0][1],&c[0][2]);
	scanf("%s%s%s",&c[1][0],&c[1][1],&c[1][2]);
	if(c[0][0]==c[1][2]){
		if(c[0][1]==c[1][1]){
			if(c[0][2]==c[1][0]){
				i=1;
			}
		}
	}
	if(i==1){
		printf("YES\n");
	}else{
		printf("NO\n");
	}
	return 0;
}
//  [javascript]
function main(input) {
  var a = input[0];
  var b = input[1].split("").reverse().join("");
  console.log(a==b?"YES":"NO");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
//  [javascript]
"use strict";

function main(arg) {
    const A = arg.split("\n")[0];
    const B = arg.split("\n")[1];
    
    console.log(B.split("").reverse().join("") == A ? "YES" : "NO");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
	input = input.trim();
	//input = input.trim().split(" ");
	input = input.trim().split("\n");
	//input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  	var c1 = input[0].split("");
  var c2 = input[1].split("");
  
  if(c1[0] == c2[2] && c1[1] == c2[1] && c1[2] == c2[0]){
     console.log("YES");
     }else{
     console.log("NO");
     }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input){
  const a = input.trim().split('\n');
  const b = a[0].split('');
  const c = a[1].split('').reverse().join('');
  if(b==c){
    console.log('YES');
  }else{
    console.log('NO');
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input){
  const a = input.trim().split('\n');
  const b = a[0].split('');
  const c = a[1].split('').reverse();
  if(b==c){
    console.log('YES');
  }else{
    console.log('NO');
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input){
  const a = input.trim().split('\n');

  if(a[0]==a[1].reverse()){
    console.log('YES');
  }else{
    console.log('NO');
  }
}
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)
	s := getString()
	t := getString()

	for i := 0; i < len(s); i++ {
		if s[i] != t[len(t)-1-i] {
			out("NO")
			return
		}
	}
	out("YES")
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var a, b string
	fmt.Scan(&a, &b)
	if a[0] == b[2] && a[1] == b[1] && a[2] == b[0] {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
//  [go]
package main

import "fmt"

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func main() {
	var a, b string
	fmt.Scan(&a, &b)
	if reverse(a) == b {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
//  [go]
package main

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

func main() {
	io, flush := NewIO()
	defer flush()

	n := io.ScanInt()
	a := io.ScanInts(n)
	b := io.ScanInts(n)
	c := io.ScanInts(n)

	sort.Ints(a)
	sort.Ints(b)
	sort.Ints(c)

	var count int
	for i := 0; i < n; i++ {
		bi := sort.SearchInts(b, a[i])
		if bi >= n {
			break
		}
		if a[i] == b[bi] && bi < n-1 {
			bi++
		}
		for j := bi; j < len(b); j++ {
			ci := sort.SearchInts(c, b[j])
			if ci >= n {
				break
			}
			if ci < n {
				if c[ci] == b[j] {
					count += n - ci - 1
				} else {
					count += n - ci
				}
			}
		}
		b = b[bi:]
	}
	fmt.Println(count)
}

type IO struct {
	scanner *bufio.Scanner
	writer  *bufio.Writer
}

func NewIO() (*IO, func()) {
	io := &IO{
		scanner: newScanner(),
		writer:  newWriter(),
	}
	return io, func() { io.writer.Flush() }
}

func newScanner() *bufio.Scanner {
	s := bufio.NewScanner(os.Stdin)
	s.Buffer(make([]byte, 10000000), 10000000)
	s.Split(bufio.ScanWords)
	return s
}

func newWriter() *bufio.Writer {
	return bufio.NewWriter(os.Stdout)
}

func (io *IO) ScanBytes() []byte {
	if !io.scanner.Scan() {
		panic("scan string failed")
	}
	return io.scanner.Bytes()
}

func (io *IO) ScanString() string {
	if !io.scanner.Scan() {
		panic("scan string failed")
	}
	return io.scanner.Text()
}

func (io *IO) ScanStrings(n int) []string {
	strs := make([]string, n)
	for i := 0; i < n; i++ {
		strs[i] = io.ScanString()
	}
	return strs
}

func (io *IO) Scan2DStrings(y, x int) [][]string {
	strings := make([][]string, y)
	for i := 0; i < y; i++ {
		strings[i] = io.ScanStrings(x)
	}
	return strings
}

func (io *IO) Scan2DGraph(y int) [][]string {
	strs := make([][]string, y)
	for i := 0; i < y; i++ {
		strs[i] = strings.Split(io.ScanString(), "")
	}
	return strs
}

func (io *IO) ScanInt() int {
	return int(io.ScanInt64())
}

func (io *IO) ScanInt2() (int, int) {
	return int(io.ScanInt64()), int(io.ScanInt64())
}

func (io *IO) ScanInt3() (int, int, int) {
	return int(io.ScanInt64()), int(io.ScanInt64()), int(io.ScanInt64())
}

func (io *IO) ScanInt4() (int, int, int, int) {
	return int(io.ScanInt64()), int(io.ScanInt64()), int(io.ScanInt64()), int(io.ScanInt64())
}

func (io *IO) ScanInts(n int) []int {
	ints := make([]int, n)
	for i := 0; i < n; i++ {
		ints[i] = io.ScanInt()
	}
	return ints
}

func (io *IO) Scan2DInts(y, x int) [][]int {
	ints := make([][]int, y)
	for i := 0; i < y; i++ {
		ints[i] = io.ScanInts(x)
	}
	return ints
}

func (io *IO) ScanInt64() int64 {
	i, err := strconv.ParseInt(io.ScanString(), 10, 64)
	if err != nil {
		panic(err)
	}
	return i
}

func (io *IO) ScanFloat64() float64 {
	i, _ := strconv.ParseFloat(io.ScanString(), 64)
	return i
}

func (io *IO) ScanFloat64s(n int) []float64 {
	floats := make([]float64, n)
	for i := 0; i < n; i++ {
		floats[i] = io.ScanFloat64()
	}
	return floats
}

func (io *IO) Println(a ...interface{}) {
	fmt.Fprintln(io.writer, a...)
}
//  [go]
package main

import "fmt"

func Reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func main() {
	var A, B string
	fmt.Scan(&A, &B)

	A = Reverse(A)
	ans := "No"

	if A == B {
		ans = "Yes"
	}

	fmt.Println(ans)

}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var a, b string
	fmt.Scan(&a, &b)
	if a[0] == b[2] && a[1] == b[1] && a[2] == b[2] {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
//  [ruby]
lines = []
while line = gets
    lines << line.chomp.to_s
end
c=lines[1].reverse
 
puts lines[0]==c ? "YES":" NO"
//  [ruby]
# 123
# 456
#===================
# 654
# 321
c1 = gets.chomp
c2 = gets.chomp
if c1 == c2.reverse
  puts "YES"
else
  puts "NO"
end
//  [ruby]
r=gets.chop
g=gets.chop

if r[0] == g[2] && r[1] == g[1] && r[2] == g[0]
  puts "YES"
else
  puts "NO"
end
//  [ruby]
r1 = gets.chomp
r2 = gets.chomp
puts r1.reverse == r2 ? :Yes: :No
//  [ruby]
s = gets.chomp
t = gets.chomp.reverse

puts s == t ? "Yes" : "No"
//  [ruby]
a=gets.chomp
b=gets.chomp
puts (　a.reverse==b　? "YES" : "NO" )
//  [rust]
//! ----------------------------------------------
//! Framework <https://github.com/vain0x/procon>
//!
//! See the bottom of file for solution.
//! ----------------------------------------------

#![allow(unused_imports)]
#![allow(non_snake_case)]

use std::cell::RefCell;
use std::cmp::{max, min, Ordering};
use std::collections::*;
use std::fmt::{Debug, Display, Formatter, Write as FmtWrite};
use std::io::{stderr, stdin, BufRead, Write};
use std::mem::{replace, swap};
use std::ops::*;
use std::rc::Rc;

/// Print values to standard error if debug mode.
#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), stderr());
            writeln!(err, "\x1B[33m{}\x1B[0m = {:?}", e, $e).unwrap()
        })*
    };
}

/// Read from standard input and parse each word.
/// - `read!(T, U, ..)` parses a line as a tuple of words.
/// - `read![[T]]` parses a line as an array of words.
/// - `read![..; N]` parses `N` lines, using `read!(..)` repeatedly.
#[allow(unused_macros)]
macro_rules! read {
    ([$t:ty] ; $n:expr) =>
        ((0..$n).map(|_| read!([$t])).collect::<Vec<_>>());
    ($($t:ty),+ ; $n:expr) =>
        ((0..$n).map(|_| read!($($t),+)).collect::<Vec<_>>());
    ([$t:ty]) =>
        (rl().split_whitespace().map(|w| w.parse().unwrap()).collect::<Vec<$t>>());
    ($($t:ty),*) => {{
        let buf = rl();
        let mut w = buf.split_whitespace();
        ($(w.next().unwrap().parse::<$t>().unwrap()),*)
    }};
}

/// Read a line from standard input.
#[allow(dead_code)]
fn rl() -> String {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();

    #[allow(deprecated)]
    buf.trim_right().to_owned()
}

// -----------------------------------------------
// Solution
// -----------------------------------------------

fn main() {
    let C = read![String; 2];

    let C = C
        .into_iter()
        .map(|row| row.chars().collect::<Vec<_>>())
        .collect::<Vec<_>>();

    let ok = (0..3).all(|i| C[0][i] == C[1][2 - i]);

    println!("{}", if ok { "YES" } else { "NO" })
}
//  [rust]
use std::io;
use std::str::FromStr;

fn input_char_vec() -> Vec<char> {
    let mut line: String = String::new();
    io::stdin().read_line(&mut line);
    line.chars().collect()
}

fn main() {
    let s = input_char_vec();
    let t = input_char_vec();
    if s[0] == t[2] && s[1] == t[1] && s[2] == t[0] {
        println!("YES");
    } else {
        println!("NO");
    }
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String {
            bytes
                .by_ref()
                .map(|r| r.unwrap() as char)
                .skip_while(|c| c.is_whitespace())
                .take_while(|c| !c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

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

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

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

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

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

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

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

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

#[allow(unused_imports)]
use std::cmp::{min, max};

fn main() {
    input!{
        s: chars,
        mut t: chars
    }
    t.reverse();
    println!("{}", if s == t {"YES"} else {"NO"});
}
//  [rust]
use proconio::{input, fastout};
use proconio::marker::{Chars};
use proconio::marker::Usize1;
use std::cmp::*;

macro_rules! debug {
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

#[fastout]
fn main() {
    input!{
        c: [Chars;2],
    }

    if (c[0][0]==c[0][2] && c[1][0]==c[1][2]) || (c[0][0]==c[1][2] && c[0][2]==c[1][0] && c[0][1]==c[1][1]) {
        println!("YES");
    } else {
        println!("NO");
    }

}
//  [rust]
fn main() {
    let mut v: Vec<Vec<char>>  = vec![Vec::new(); 3];
    for i in 0..3 {
        let s: String = read();
        v.push(s.chars().collect());
    }
    if v[0][0] == v[1][2] && v[0][1] == v[1][1] && v[0][2] == v[1][0] {
        println!("YES");
    } else {
        println!("NO");
    }

}

// 以下関数

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")
}

pub const MOD: u64 = 10e9 as u64 + 7;

pub fn is_prime(n: i32) -> bool {
    if n < 2 {
        return false;
    } else if n == 2 {
        return true;
    }
    let mut i = 2;
    while i * i < n {
        if n % i == 0 {
            return false;
        } else {
            i += 1;
            continue;
        }
    }
    true
}

pub fn lcm(mut n: i32, mut m: i32) -> i32 {
    n = if n > m { m } else { n };
    m = if n > m { n } else { m };
    let mut i = n;
    while i % m != 0 {
        i += n;
    }
    i
}
//  [swift]
import Glibc
extension String: CollectionType {}

//var abc = readLine()!.split(" ").map { Int($0)! }
var a = readLine()!
var b = readLine()!
print(a == String(b.characters.reverse()) ? "YES" : "NO")
//  [swift]
func i()->[String]{return readLine()!.characters.map{String($0)}};print(i()==i().reverse() ?"YES":"NO")
//  [swift]
func i()->[String]{return readLine()!.characters.map{String($0)}};print(i()==i().reverse ?"YES":"NO")
//  [swift]
print(readLine()!.characters.map{String($0)}==readLine()!.characters.map{String($0)}.reverse ?"YES":"NO")
//  [swift]
print(readLine()!.characters.map{$0}==readLine()!.characters.map{$0}.reverse ?"YES":"NO")
//  [typescript]
"use strict";
const Main = (input) =>{
   let xs = input.trim().split('\n');
   let x = xs[0].split('');
   let y = xs[1].split('');
   let z = [];
   let count = 0;
   for(let i =y.length-1; i>=0; i--){
       z.push(y[i]);
   }
   for(let i=0; i<x.length; i++){
     if(x[i]==z[i]){
       count++
     }else{
       break;
     }
   }
   if(count==x.length){
     console.log('YES');
   }else{
     console.log('NO');
   }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [typescript]
const main = (input) => {
  input = input.trim();
  input = input.split('\n');
  const A = input[0];
  const B = input[1];
 
  if (A[0]==B[2]&&A[2]==B[0]&&A[1]==B[1]){
    console.log("YES");
  }else{
    console.log("NO");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const t={input:require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/),n:(arg:number=0):any=>{if(arg){const a:number[]=[];for(let i=0;i<arg;i++) {a.push(t.n());}return a;}else{const a = t.input[0];t.input.shift();return Number(a);}},s:(arg:number=0):any=>{if(arg){const a:string[]=[];for(let i=0;i<arg;i++){a.push(t.s());}return a;}else{const a=t.input[0];t.input.shift();return String(a);}},c:(arg:number=0):any=>{if(arg) {const a:string[]=[];for(let i=0;i<arg;i++) {a.push(t.c());}return a;}else{let a=t.input[0].split('');const b=a[0];a.shift();if(a.length>0){t.input[0]=a.join('');}else{t.input.shift();}return String(b);}},o: (...arg)=>{console.log(...arg);},abs:(a)=>{return Math.abs(a);},min:(a)=>{return Math.min(a);},max:(a)=>{return Math.max(a);},floor:(a)=>{return Math.floor(a);},asc:(ar:number[])=>{return ar.sort((a,b)=>{return a-b});},desc:(ar:number[])=>{ return ar.sort((a,b)=>{return b-a});},sw:(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1]}return arr[arr.length-1];}}
const main = ()=>{
  let [a,b,c,d,e,f] = t.c(6)
  t.o(a==f&&b==e&&c==d?'YES':'NO')
}
main()
//  [typescript]
import * as fs from 'fs';

namespace AtCoder {
    export interface Paramable {
        readonly args: string[][];
    }

    export interface Task {
        main(this: Task): void;
    }
}

namespace AtCoder.abc001 {
    export class TaskA implements AtCoder.Task, AtCoder.Paramable {
        public constructor(public readonly args: string[][]) {
        }

        public main(this: TaskA): void {
            const [c1, c2, c3]: string[] = this.args[0][0].split('');
            const [c4, c5, c6]: string[] = this.args[1][0].split('');

            if (c1 === c6 && c2 === c5 && c3 === c4) {
                console.log('Yes');
            } else {
                console.log('No');
            }

        }
    }

    const args: string[][] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n').map(r => r.split(' '));
    const task: AtCoder.Task = new TaskA(args);
    task.main();
}
//  [typescript]
const t={input:require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/),n:(arg:number=0):any=>{if(arg){const a:number[]=[];for(let i=0;i<arg;i++) {a.push(t.n());}return a;}else{const a = t.input[0];t.input.shift();return Number(a);}},s:(arg:number=0):any=>{if(arg){const a:string[]=[];for(let i=0;i<arg;i++){a.push(t.s());}return a;}else{const a=t.input[0];t.input.shift();return String(a);}},c:(arg:number=0):any=>{if(arg) {const a:string[]=[];for(let i=0;i<arg;i++) {a.push(t.c());}return a;}else{let a=t.input[0].split('');const b=a[0];a.shift();if(a.length>0){t.input[0]=a.join('');}else{t.input.shift();}return String(b);}},o: (...arg)=>{console.log(...arg);},abs:(a)=>{return Math.abs(a);},min:(a)=>{return Math.min(a);},max:(a)=>{return Math.max(a);},floor:(a)=>{return Math.floor(a);},asc:(ar:number[])=>{return ar.sort((a,b)=>{return a-b});},desc:(ar:number[])=>{ return ar.sort((a,b)=>{return b-a});},sw:(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1]}return arr[arr.length-1];}}
const main = ()=>{
  let [a,b,c,d,e,f] = t.c(6)
  t.o(a==f&&b==e&&c==d?'Yes':'No')
}
main()
//  [typescript]
const main = (input) => {
  input = input.trim();
  input = input.split('\n');
  const A = input[0];
  const B = input[1];
  
  const Aresult = A.slice(0,1);
  const resultA = A.slice(-1);
  const Bresult = B.slice(0,1);
  const resultB = B.slice(-1);
  const Acenter = A.slice(0,2);
  const Bcenter = B.slice(0,2);
  
  if (Aresult==resultB&&Bresult==resultA&&Acenter==Bcenter){
    console.log("YES");
  }else{
    console.log("NO");
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
l = sorted(list(map(int, input().split())), reverse = True)
print(l[0] * 10 + l[1] + l[2])
//  [python]
a,b,c=map(int,input().split())

print(max(a,b,c)*9+a+b+c)
//  [python]
val = sorted(map(int, input().split()))

print(max(val) * 9 + sum(val))
//  [python]
A, B, C = map(int, input().split())

t = sorted([A, B, C])
print(t[0] * 10 + t[1] + t[2])
//  [python]
A, B, C = map(int, input().split())

t = sorted([A, B, C])
print(A * 10 + B + C)
//  [python]
A, B, C = map(int, input().split())

print(max(A * 10 + B + C, A + B * 10 + C))
//  [java]
import java.util.HashSet;
import java.util.Set;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] xyz = br.readLine().split(" ");
        int x = Integer.parseInt(xyz[0]);
        int y = Integer.parseInt(xyz[1]);
        int z = Integer.parseInt(xyz[2]);
        
        int a = x*10+y+z;
        int b = x+y*10+z;
        int c = x+y+z*10;
        
        if (a>=b && a>=c) {
            System.out.println(a);
        }
        else if (b>=a && b >= c) {
            System.out.println(b);
        }
        else {
            System.out.println(c);
        }
        
        //System.out.println(Math.max(a, b, c));
        
        
    }
}
//  [java]
import java.io.*;
import java.util.*;
class Main{
	static final long MOD = 1_000_000_007; // 10^9+7
    static final int MAX = 2_147_483_646; // intMax 
    static final int INF = 1_000_000_000; // 10^9  
    public static void main(String[] args) throws Exception {
		hayami saori = new hayami();
		int n[] = new int[3];
		for(int i = 0;i<3;i++){
			n[i] = saori.saori_hayami();
		}
		Arrays.sort(n);
		int a = n[2] * 10 + n[1] + n[0];
		System.out.println(a);
		
		saori.close();
    }
}

class hayami implements Closeable {
	private final InputStream in = System.in;
	private final byte[] hayami = new byte[1024];
	private int Hayami = 0;
	private int saori = 0;
	private boolean HayamiSaori() {
		if (Hayami < saori) {
			return true;
		}else{
			Hayami = 0;
			try {
				saori = in.read(hayami);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (saori <= 0) {
				return false;
			}
		}
		return true;
	}
	private int SaoriHayami() { 
		if (HayamiSaori()) {
            return hayami[Hayami++];
         }else{
             return -1;
         }
	}
	private static boolean hayami_saori(int hayami) { 
		return 33 <= hayami && hayami <= 126;
	}
	public boolean hayamisaori() { 
		while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
	}
	public String nextHayami() {
		if (!hayamisaori()) throw new NoSuchElementException();
		StringBuilder hayamin = new StringBuilder();
		int saori = SaoriHayami();
		while(hayami_saori(saori)) {
			hayamin.appendCodePoint(saori);
			saori = SaoriHayami();
		}
		return hayamin.toString();
	}
	public long saorihayami() {//nextLong
		if (!hayamisaori()) throw new NoSuchElementException();
		long hayami = 0;
		boolean misao = false;
		int saori = SaoriHayami();
		if (saori == '-') {
			misao = true;
			saori = SaoriHayami();
		}
		if (saori < '0' || '9' < saori) {
			throw new NumberFormatException();
		}
		while(true){
			if ('0' <= saori && saori <= '9') {
				hayami *= 10;
				hayami += saori - '0';
			}else if(saori == -1 || !hayami_saori(saori)){
				return misao ? -hayami : hayami;
			}else{
				throw new NumberFormatException();
			}
			saori = SaoriHayami();
		}
	}
	public int saori_hayami() {//nextInt
		long hayami = saorihayami();
		if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
		return (int) hayami;
	}
	public double Hayamin() { //nextDouble
		return Double.parseDouble(nextHayami());
	}
	public void close() {
		try {
			in.close();
		} catch (IOException e) {
		}
    }
    
}
//  [java]


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public final class Main {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final int[] arr = fs.nextIntArray(3);
        Arrays.sort(arr);
        System.out.println(arr[0] * 10 + arr[1] + arr[2]);
    }

    static final class Utils {
        public static void shuffleSort(int[] x) {
            shuffle(x);
            Arrays.sort(x);
        }

        public static void shuffleSort(long[] x) {
            shuffle(x);
            Arrays.sort(x);
        }

        public static void shuffle(int[] x) {
            final Random r = new Random();

            for (int i = 0; i <= x.length - 2; i++) {
                final int j = i + r.nextInt(x.length - i);
                swap(x, i, j);
            }
        }

        public static void shuffle(long[] x) {
            final Random r = new Random();

            for (int i = 0; i <= x.length - 2; i++) {
                final int j = i + r.nextInt(x.length - i);
                swap(x, i, j);
            }
        }

        public static void swap(int[] x, int i, int j) {
            final int t = x[i];
            x[i] = x[j];
            x[j] = t;
        }

        public static void swap(long[] x, int i, int j) {
            final long t = x[i];
            x[i] = x[j];
            x[j] = t;
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int[] nextIntArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
}
//  [java]
import java.lang.reflect.Array;
import java.util.*;
import java.io.*;
import java.lang.*;

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[] arr = {a,b,c};
        Arrays.sort(arr);

        System.out.println(((c*10)+b)+a);
    }
}
//  [java]
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        A solver = new A();
        solver.solve(1, in, out);
        out.close();
    }

    static class A {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int a = Integer.parseInt(in.next());
            int b = Integer.parseInt(in.next());
            int c = Integer.parseInt(in.next());
            int ans1 = a + b * 10 + c;
            int ans2 = a * 10 + b + c;

            // 出力
            out.println(Math.max(ans1, ans2));

        }

    }
}
//  [cpp]
#include<stdio.h>
int main()
{
    int a,b,c,max,hi;
    // 整数の入力
    scanf("%d %d %d", &a,&b,&c);
  
	if(a>=b && a>=c){
      max=10*a+b+c;
    }else if(b>=a && b>=c){
      max=a+10*b+c;
    }else{
      max=a+b+10*c;
    }
    // 出力
    printf("%d \n",max);
    return 0;
}
//  [cpp]
#include <stdio.h>

int main(){
    int a,b,c;
    int ans;
    scanf("%d %d %d",&a, &b, &c);
    if(a>=b && a>=c) ans = a*10+b+c;
    else if (b>=c && b>=a) ans=b*10+a+c;
    else ans=c*10+b+a;
    printf("%d\n",ans);  
    return 0;
}
//  [cpp]
#include <stdio.h>

int max(int a,int b)
{
    return a>b?a:b;
}

int main()
{
    int a[3];
    scanf("%d %d %d",&a[0],&a[1],&a[2]);
    printf("%d\n",max(a[0],max(a[1],a[2]))*10+a[0]+a[1]+a[2]-max(a[0],max(a[1],a[2])));
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;  

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    
    cout << max(a*10+b + c, a+b*10+c) << endl;
    
    return (0);
}
//  [cpp]
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;



int main() {
    int a, b, c;
    cin >> a >> b >> c;
    int ans = 0;
    ans = max(ans, 10*a+b+c);
    ans = max(ans, a+b*10+c);
    cout << ans << endl;
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
 
using namespace std;
 
#define repr(i,a,b) for (int i=a; i<b; i++)
#define rep(i,n) for (int i=0; i<  n; i++)
 
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; }
 
const long long INF = 1LL << 60;
#define PI 3.14159265359 
long long MOD = 1000000007;


template<typename T>
void remove(std::vector<T>& vector, unsigned int index)
{
    vector.erase(vector.begin() + index);
}
 
int gcd(int a, int b){
    if(b == 0) return a;
    else return gcd(b, a%b);
}
 
long long lcm (int a, int b){
    return  (long long) a*b /gcd(a,b);
}

long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }

long long dp[200100];

int main(){
    int a, b, c;
    cin >> a >> b >> c;

    cout << max(10*a + b, 10*b+c) << endl;

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

int main(void){

  int a,b,c;
	scanf("%d %d %d", &a, &b, &c);
	int max = a;
	if (b > max) {
		max = b;
	}
	if (c > max) {
		max = c;
	}
	int answer = a+b+c+max*9;
	printf("%d\n", answer);

  return 0;
}
//  [c]
i=3,x,s;main(b){for(;i--;s+=x,b=b>x?b:x)scanf("%d",&x);printf("%d\n",s+b*9);}
//  [c]
#include<stdio.h>
int main(void){
  int a,b,c;
  int d,e,f;
  scanf("%d %d %d", &a,&b,&c);
  if(a < b){
    if(b < c){
      d = c;
      e = b;
      f = a;
    }
    else{
      d = b;
      e = c;
      f = a;
    }
  }
  else{
    if(a < c){
      d = c;
      e = a;
      f = b;
    }
    else{
      d = a;
      e = c;
      f = b;
    }      
  }
  printf("%d\n", (d*10)+e+f);
  return 0;
}
//  [c]
//   https://atcoder.jp/contests/abc110/tasks/abc110_a


#include<stdio.h>   //AA06( 30/ 07/ 20) If u see my code, Have a Good Day! (^_^)

int Maximum(int x, int y, int z);

int main()
{
    int A, B, C, Ans;

    (void)scanf("%d%d%d", &A, &B, &C);

    Ans = (Maximum(A, B, C) * 10 ) + A + B + C - Maximum(A, B, C);

    printf("%d\n", Ans);

    return 0;
}


int Maximum(int x, int y, int z)
{
    if(x > y && x > z)
        return x;

    else if(y > z && y > x)
        return y;

    else
        return z;
}
//  [c]
//   https://atcoder.jp/contests/abc110/tasks/abc110_a


#include<stdio.h>   //AA06( 29/ 07/ 20) If u see my code, Have a Good Day! (^_^)

int Maximum(int x, int y, int z);

int main(void)
{
    int A, B, C, Ans;

    scanf("%d%d%d", &A, &B, &C);

    Ans = (Maximum(A, B, C) * 10 ) + A + B + C - Maximum(A, B, C);

    printf("%d\n", Ans);

    return 0;
}


int Maximum(int x, int y, int z)
{
    if(x > y && x > z)
        return x;

    else if(y > z && y > x)
        return y;

    else
        return z;
}
//  [c]
//   https://atcoder.jp/contests/abc110/tasks/abc110_a


#include<stdio.h>   //AA06( 29/ 07/ 20) If u see my code, Have a Good Day! (^_^)

int Maximum(int x, int y, int z);

int main()
{
    int A, B, C, Ans;

    scanf("%d%d%d", &A, &B, &C);

    Ans = (Maximum(A, B, C) * 10 ) + A + B + C - Maximum(A, B, C);

    printf("%d\n", Ans);

    return 0;
}


int Maximum(int x, int y, int z)
{
    if(x > y && x > z)
        return x;

    else if(y > z && y > x)
        return y;

    else
        return z;
}
//  [javascript]
function Main(input) {
	input = input.trim().split(" ");
  input.sort(function(a,b){
  	return parseInt(b) - parseInt(a);
  });
  console.log(parseInt(input[0] + input[1]) + parseInt(input[2]));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input) {
  const A = parseInt(input.split(" ")[0], 10);
  const B = parseInt(input.split(" ")[1], 10);
  const C = parseInt(input.split(" ")[2], 10);
  var arr=[A+10*B+C, 10*A+B+C, 10*C+A+B]
  console.log(Math.max.apply(null, arr));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
	tmp = input[0].split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = parseInt(tmp[0], 10);
	var b = parseInt(tmp[1], 10);
	var c = parseInt(tmp[2], 10);

    var max = Math.max(a,b,c);

    if (a == max) {
        console.log('%d',((a * 10) + b + c));
        return;
    }
    if (b == max) {
        console.log('%d',((b * 10) + a + c));
        return;
    }
    if (c == max) {
        console.log('%d',((c * 10) + a + b));
        return;
    }

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input) {
   input = input.trim();
  const a = input.split(" ").map(Number);
  console.log(Math.max(a[0],Math.max(a[1],a[2])*9+a[0]+a[1]+a[2]));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]

function main(input){
    abc=input.split(' ');
    abc=abc.sort();
    a='';
    a+=abc[2];
    a+=abc[1];
    a=parseInt(a,10);
    b=parseInt(abc[0],10);
    console.log(a+b);
    


}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]

function main(input){
    abc=input.split(' ');
    abc=abc.sort()
    a=''
    a+=abc[2]
    a+=abc[1]
    a=parseInt(a,10)
    b=parseInt(abc[0],10)
    console.log(a+b)
    


}

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

import (
	"fmt"
	"math"
)

// 以下の問題
// https://atcoder.jp/contests/abc110/tasks/abc110_a

func main() {
	var a, b, c float64
	fmt.Scan(&a, &b, &c)

	// A問題なのでsortを使わずにmath.Maxで解くのが正攻法だと思う
	fmt.Println(math.Max(10*a+b+c, math.Max(10*b+a+c, 10*c+a+b)))
}
//  [go]
package main

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

func main() {
	sc.Split(bufio.ScanWords)
	a := nextInts(3)
	sort.Sort(sort.IntSlice(a))
	puts(a[2]*10 + a[1] + a[0])
	wt.Flush()
}

var (
	sc  = bufio.NewScanner(os.Stdin)
	rdr = bufio.NewReaderSize(os.Stdin, 1000000)
	wt  = bufio.NewWriter(os.Stdout)
)

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

func nextInt() int {
	i, _ := strconv.Atoi(next())
	return i
}

func nextFloat64() float64 {
	f, _ := strconv.ParseFloat(next(), 64)
	return f
}

func nextInts(n int) []int {
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		slice[i] = nextInt()
	}
	return slice
}

func nextFloat64s(n int) []float64 {
	slice := make([]float64, n)
	for i := 0; i < n; i++ {
		slice[i] = nextFloat64()
	}
	return slice
}

func nextMega() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, _ := rdr.ReadLine()
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func putf(format string, a ...interface{}) {
	fmt.Fprintf(wt, format, a...)
}

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}