akhauriyash/Code-Regression huggingface dataset:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def roundUp(a, b):
        return -(-a // b)

    @staticmethod
    def toUpperMultiple(a, x):
        return Math.roundUp(a, x) * x

    @staticmethod
    def toLowerMultiple(a, x):
        return (a // x) * x

    @staticmethod
    def nearPow2(n):
        if n <= 0:
            return 0
        if n & (n - 1) == 0:
            return n
        ret = 1
        while(n > 0):
            ret <<= 1
            n >>= 1
        return ret

    @staticmethod
    def sign(n):
        if n == 0:
            return 0
        if n < 0:
            return -1
        return 1

    @staticmethod
    def isPrime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


class PriorityQueue:
    def __init__(self, l=[]):
        self.__q = l
        heapq.heapify(self.__q)
        return

    def push(self, n):
        heapq.heappush(self.__q, n)
        return

    def pop(self):
        return heapq.heappop(self.__q)


MOD = int(1e09) + 7
INF = int(1e15)


def calc(N):
    return sum(int(x) for x in str(N))


def main():
    # sys.stdin = open("sample.txt")
    N = Scanner.int()
    A = Scanner.map_int()
    X = A[1]
    for i in range(2, N):
        X = X ^ A[i]
    print("YNeos "[X != A[0]::2])
    return


if __name__ == "__main__":
    main()


Measured memory_bytes: 58924
import core.bitop;
import std.algorithm;
import std.ascii;
import std.bigint;
import std.conv;
import std.functional;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.random;
import std.typecons;
import std.container;

ulong MOD = 1_000_000_007;
ulong INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias t = Tuple!(string, "name", long, "y");

void main()
{
    auto x = lread();
    auto n = (x + 5 + 6 - 1) / (5 + 6);
    if (5 * (n - 1) + 6 * n >= x)
    {
        writeln(2 * n - 1);
    }
    else
    {
        writeln(2 * n);
    }
}

T lread(T = long)()
{
    return readln.chomp.to!T();
}

T[] aryread(T = long)()
{
    return readln.split.to!(T[])();
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}


Measured memory_bytes: 256
N = int(input())
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A = [A1,A2]
# ここまでが入力

l = []
# 経路の選び方は i に関して
# i回右に進む
# 1回下に進む
# N-i-1回右に進む
# つまり、上の行の[0]~[i]までを加算
# 下の行の[i]~[N]を加算すればいいだけである
for i in range(N):
    counter = 0
    for j in range(i+1):
        counter += A1[j]
    for j in range(i, N):
        counter += A2[j]
    l.append(counter)

print(max(l))

Measured memory_bytes: 3064
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    char c1, c2, c3, c4;
    int card[5] = {};
    
    while (cin >> card[0] >> c1 >> card[1] >> c2 >> card[2] >> c3 >> card[3] >> c4 >> card[4]) {
        sort(card, card + 5);

        if (card[0] == card[3] || card[1] == card[4]) {
            cout << "four card" << endl;
        }
        else if ((card[0] == card[2] && card[3] == card[4]) || (card[0] == card[1] && card[2] == card[4])) {
            cout << "full house" << endl;
        }
        else if (card[0] + 1 == card[1] && card[1] + 1 == card[2] && card[2] + 1 == card[3] && card[3] + 1 == card[4]) {
            cout << "straight" << endl;
        }
        else if (card[0] == 1 && card[1] == 10 && card[2] == 11 && card[3] == 12 && card[4] == 13) {
            cout << "straight" << endl;
        }
        else if (card[0] == card[2] || card[1] == card[3] || card[2] == card[4]) {
            cout << "three card" << endl;
        }
        else if ((card[0] == card[1] && (card[2] == card[3] || card[3] == card[4])) || (card[1] == card[2] && card[3] == card[4])) {
            cout << "two pair" << endl;
        }
        else if (card[0] == card[1] || card[1] == card[2] || card[2] == card[3] || card[3] == card[4]) {
            cout << "one pair" << endl;
        }
        else {
            cout << "null" << endl;
        }
    }
    return 0;
}

Measured memory_bytes: 2968
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define rrep(i,n) for(int i=1;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define dunk(a) cout << (a) << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1001001001;
const int mod = 1000000007;

class UnionFind {
public:
	//親の番号を格納する。親だった場合は-(その集合のサイズ)
	vector<int> Parent;
	//作るときはParentの値を全て-1にする
	//こうするとすべてバラバラになる
	UnionFind(int N) {
		Parent = vector<int>(N, -1);
	}
	//Aがどのグループに属しているか調べる
	int root(int A) {
		if (Parent[A] < 0) return A;
		return Parent[A] = root(Parent[A]);
	}
	//自分のいるグループの頂点数を調べる
	int size(int A) {
		return -Parent[root(A)];//親をとってきたい
	}
	//AとBをくっつける
	bool connect(int A, int B) {
		//AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
		A = root(A);
		B = root(B);
		if (A == B) {
			//すでにくっついているからくっつけない
			return false;
		}
		//大きい方(A)に小さいほう(B)をくっつけたい
		//大小が逆だったらひっくり返しちゃう
		if (size(A) < size(B)) swap(A, B);
		//Aのサイズを更新する
		Parent[A] += Parent[B];
		//Bの親をAに変更する
		Parent[B] = A;

		return true;
	}
	bool same(int x, int y) { return root(x) == root(y); }
};

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, q;
	cin >> n >> q;
	vector<int> c(q), x(q), y(q);
	rep(i, q) cin >> c[i] >> x[i] >> y[i];
	UnionFind Uni(n);
	rep(i, q) {
		if (c[i]) dunk(Uni.same(x[i], y[i]));
		else {
			Uni.connect(x[i], y[i]);
		}
	}

	return 0;
}


Measured memory_bytes: 4256
N = int(input())
XYH = []
for i in range(N):
    XYH.append(list(map(int,input().split())))

flag=0
for Cx in range(101):
    for Cy in range(101):
        Hcands = []
        for i in range(N):
            X = XYH[i][0]
            Y = XYH[i][1]
            h = XYH[i][2]
            if h>0:
                Hcand = abs(Cx-X)+abs(Cy-Y)+h
                break
        for i in range(N):
            X = XYH[i][0]
            Y = XYH[i][1]
            h = XYH[i][2]
            if h != max(Hcand-abs(Cx-X)-abs(Cy-Y), 0):
                flag=0
                break
            else:
                flag=1
        if flag==1:
            print(Cx,Cy,Hcand)
            break
    if flag==1:
        break

Measured memory_bytes: 43504
#include <stdio.h>
#include <string.h>
#include <utility>
#include <algorithm>

using namespace std;

const int MAXN = 1000;
int n;
int a[MAXN], b[MAXN], c[MAXN];
bool v[MAXN];
int f[2][1<<20];
int que[2][1<<20], head[2], tail[2];
int mark[1<<20];
int ans;

void init()
{
	for (int i = 0; i < n; ++i) {
		scanf("%d", &a[i]);
		b[i] = 0;
		while (~a[i]&1) {
			++b[i];
			a[i] >>= 1;
		}
	}
}

int dp(int a[], int n)
{
	static int stamp = 0;
	f[0][0] = 0;
	head[0] = tail[0] = 0;
	f[0][tail[0]++] = 0;
	for (int i = 0; i < n; ++i) {
		++stamp;
		head[~i&1] = tail[~i&1] = 0;
		while (head[i&1] < tail[i&1]) {
			int mask = que[i&1][head[i&1]++];
			if (mark[mask] != stamp) {
				f[~i&1][mask] = f[i&1][mask];
				que[~i&1][tail[~i&1]++] = mask;
				mark[mask] = stamp;
			} else {
				f[~i&1][mask] = max(f[~i&1][mask], f[i&1][mask]);
			}
			if (mask&((1<<a[i])-1)) continue;
			int nmask = mask + (1<<a[i]);
			if (mark[nmask] != stamp) {
				f[~i&1][nmask] = f[i&1][mask] + 1;
				que[~i&1][tail[~i&1]++] = nmask;
				mark[nmask] = stamp;
			} else {
				f[~i&1][nmask] = max(f[~i&1][nmask], f[i&1][mask] + 1);
			}
		}
	}
	int ans = 0;
	for (int i = 0; i < 20; ++i) {
		if (mark[1<<i] == stamp) ans = max(ans, f[n&1][1<<i]);
	}
	return ans;
}

void solve()
{
	ans = 0;
	memset(v, 0, sizeof(v));
	for (int i = 0; i < n; ++i) {
		if (v[i]) continue;
		int m = 0;
		for (int j = i; j < n; ++j) {
			if (a[i] == a[j]) c[m++] = b[j], v[j] = true;
		}
		ans = max(ans, dp(c, m));
	}
}

int main()
{
	while (scanf("%d", &n) != EOF && n) {
		init();
		solve();
		printf("%d\n", ans);
	}
}

Measured memory_bytes: 11796
import java.util.*;
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int i;
		int [] F = new int[45];
		F[0] =1;
		F[1] = 1;
		for(i=2;i<45;i++){
			F[i] = F[i-1]+F[i-2];
		}
       System.out.println(F[sc.nextInt()]);
		
		
	}

}



Measured memory_bytes: 26112
#include<bits/stdc++.h>
using namespace std ; 
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define fast ios_base:: sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int long long int
#define endl "\n"
#define pb push_back
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define f first
#define s second
#define pii pair<int,int> 
long long M  = 1e9+7;
 long double maxvolume( long double s) 
{ 
    // finding length 
    long double length = s / 3; 
  
    s -= length; 
  
    // finding breadth 
     long double breadth = s / 2; 
  
    // finding height 
     long double height = s - breadth; 
  
    return length * breadth * height; 
} 

signed main(){
    fast;
    long double n; cin >> n;
    long double ans = maxvolume(n);
    cout << fixed << setprecision(20) << ans << endl;
}


Measured memory_bytes: 256
import sys
input = sys.stdin.readline

N, M = list(map(int, input().split()))
T1 = [False]*(N+1)
TN = [False]*(N+1)

for _ in range(M):
    a, b = list(map(int, input().split()))
    if a==1: T1[b]=True
    if b==N: TN[a]=True

for t1, tn in zip(T1,TN):
    if t1 and tn:
        print('POSSIBLE')
        exit()

print('IMPOSSIBLE')

Measured memory_bytes: 6260
#include<bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl; 
#define INF 1000000000
#define mod 1000000007
using ll=long long;
const ll LINF = 1001002003004005006ll;
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

template<typename T>
int LIS(const vector<T> &a){
    vector<T> lis;
    for(auto &p:a){
        typename vector<T>::iterator it;
        //同値許容しない(狭義単調増加)
        it=lower_bound(begin(lis),end(lis),p);
        //同値許容(広義単調増加)
        // it=upper_bound(begin(lis),end(lis),p);
        if(end(lis)==it) lis.push_back(p);
        else *it=p;
    }
    return int(lis.size());
}

void exp(){
    int n;cin>>n;
    vector<int> v(n);
    iota(ALL(v),1);
    set<pair<int,int>> st;
    do{
        int a=LIS(v);
        auto vr=v;
        reverse(ALL(vr));
        int b=LIS(vr);
        if(st.count(make_pair(a,b))) continue;
        cout<<endl;
        debug(v);
        cout<<a<<" "<<b<<endl;
        st.insert(make_pair(a,b));
    }while(next_permutation(ALL(v)));
}

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(0);

    // exp();return 0;
    int n,a,b;cin>>n>>a>>b;
    bool rev=false;
    if(a>b) swap(a,b),rev=true;
    if((n+a-1)/a<=b and b<=n-a+1){
        //構築可能
    }else{
        cout<<-1<<endl;
        return 0;
    }
    //自然とできるぶん
    int k=b;
    k-=(n+a-1)/a;

    vector<vector<int>> ans(n+10);
    rep(i,a) ans[0].push_back(i+1);
    int lw=a+1,hi=min(2*a,n),idx=1;
    //[lw,hi]をidxの部分に作る
    while(lw<=hi){
        // cout<<lw<<' '<<hi<<" : "<<k<<endl;
        if(k>=a){
            for(int i=hi;i>=lw;i--){
                ans[idx].push_back(i);
            }
            k-=a-1;
        }
        else if(k>0){
            //左側k個を降順にする
            for(int i=lw+k;i>=lw;i--){
                ans[idx].push_back(i);
            }
            for(int i=lw+k+1;i<=hi;i++){
                ans[idx].push_back(i);
            }
            k=0;
        }
        else{
            for(int i=lw;i<=hi;i++){
                ans[idx].push_back(i);
            }
        }
        lw+=a;
        hi+=a;chmin(hi,n);
        idx++;
    }

    vector<int> v;
    for(int i=idx-1;i>=0;i--){
        for(auto x:ans[i]){
            v.push_back(x);
        }
    }
    // debug(v);
    if(rev) reverse(ALL(v));

    // int A=LIS(v);
    // reverse(ALL(v));
    // int B=LIS(v);
    // reverse(ALL(v));
    // cout<<n<<' '<<A<<' '<<B<<endl;

    assert(v.size()==n);
    rep(i,n){
        cout<<v[i]<<(i==n-1?'\n':' ');
    }
    return 0;
}


/*
20 3 17
*/

Measured memory_bytes: 17780
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <utility>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>
#include <limits.h>
#define int long
using namespace std;
using P = pair<int, int>;
using ll = long long;
using prique = priority_queue<int>;
const int MOD = 1000000007;
const int INF = LLONG_MAX/3;

signed main(){
    string s;
    cin>>s;
    int cnts=0,cntt=0;
    char now='s';
    int sum=0;
    for(int i=0;i<s.size();i++){
        if(now=='s'){
            if(s[i]=='S')cnts++;
            else{
                cntt++;
                now='t';
            }
        }else{
            if(s[i]=='T')cntt++;
            else {
                if(cntt>=cnts){
                    sum+=cnts*2;
                    cnts=1;
                    cntt=0;
                }else {
                    sum+=cntt*2;
                    cnts=cnts-cntt+1;
                    cntt=0;
                }
                now='s';
            }
        }
    }
    if(now=='t')sum+=min(cnts,cntt)*2;
    cout<<s.size()-sum<<endl;
    return 0;
}
        


Measured memory_bytes: 640
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] nums = new int[n];
		for(int i=0; i<nums.length; i++){
			nums[i] = scan.nextInt();
		}
		scan.close();
		for(int s = nums.length-1; s>=0; s--){
			if(s == 0){
				System.out.print(nums[s]);
			}else{

			System.out.print(nums[s] + " ");
			}
		}
		System.out.print("\n");
	}

}

Measured memory_bytes: 19032
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <utility>
#include <map>
#include <list>
#include <climits>
#include <set>
#include <deque>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
#include <bitset>

// #define cerr if(false)cerr
#define watch(x) cerr << "> " << #x << ": " << x << "\n";

using namespace std;

template <typename T>
std::ostream &operator <<(std::ostream &out, vector<T> &v) {
	for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
		out << v[i] << " ";
	out << "\n";
    return out;
}
template <typename T, typename N>
std::ostream &operator <<(std::ostream &out, vector<pair<T, N> > &v) {
	for (size_t i = 0; i < v.size(); ++i)
		out << "(" << v[i].first << ", " << v[i].second << ") ";
	out << "\n";
    return out;
}
template <typename T>
std::ostream &operator <<(std::ostream &out, vector<vector<T> > &v) {
	for (size_t i = 0; i < v.size(); ++i) {
		for (size_t j = 0; j < v[i].size(); ++j) {
			out << v[i][j] << " ";
		}
		out << "\n";
	}
   	return out;
}

int main() {

	std::ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	int n, m;
	cin >> n >> m;

	vector<vector<int> > services(n + 1);
	int u, v;
	for (int i = 0; i < m; ++i) {
		cin >> u >> v;
		services[u].push_back(v);
		services[v].push_back(u);
	}

	for (int i = 0; i < services[1].size(); ++i) {
		for (int j = 0; j < services[services[1][i]].size(); ++j) {
			if (services[services[1][i]][j] == n) {
				cout << "POSSIBLE\n";
				return 0;
			}
		}
	}

	cout << "IMPOSSIBLE\n";

	return 0;

}

Measured memory_bytes: 12016
#include <stdio.h>
#include <math.h>

int main(void){
	
	double a, b, c, d;
	
	scanf("%lf %lf %lf %lf", &a, &b, &c, &d);
	printf("%.8lf\n",(sqrt((c-a)*(c-a)+(d-b)*(d-b))));
	
	
	return 0;
}	

Measured memory_bytes: 656
#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>;
using ull= unsigned long long;

int main(){
  int n;
  cin>>n;
  if(((n%100)/10-7)*(n%10-7)*(n/100-7)==0){
    cout <<"Yes"<<endl;
  }else{
    cout <<"No"<<endl;
  }
}

Measured memory_bytes: 3608
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>

using namespace std;

struct DATA{
  string era;
  int x;
  int year;
};

bool Compare(const DATA&, const DATA&);

int main(){
  int i, j, n, m, x, y, ans;
  string s;
  DATA _data;
  vector<DATA> data;

  while(1){
    cin >> n >> m;
    if(n == 0 && m == 0) break;

    for(i=0; i<n; ++i){
      cin >> s >> x >> y;
      _data.era = s;
      _data.x = x;
      _data.year = y;
      data.push_back(_data);
    }
    sort(data.begin(), data.end(), Compare);

    for(i=0; i<m; ++i){
      cin >> x;

      for(j=0, y=-1; j<data.size(); ++j){
	if(x <= data[j].year){
	  y = j;
	  break;
	}
      }

      if(y == -1){
	cout << "Unknown" << endl;
      }else{
	if(x > data[y].year-data[y].x){
	  ans = data[y].x - data[y].year + x;
	  cout << data[y].era << " " << ans << endl;
	}else{
	  cout << "Unknown" << endl;
	}
      }
    }

    data.clear();
  }
  return 0;
}

bool Compare(const DATA& x, const DATA& y){
  return (x.year < y.year);
}

Measured memory_bytes: 980
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vl = vector<ll>;
using pll = pair<ll, ll>;

#define rep(i, n) for (ll i = 0, xxx_rep_end = (n); i < xxx_rep_end; ++i)
#define all(x) (x).begin(), (x).end()

template <class T1, class T2>
inline bool chmax(T1 &a, const T2 &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template <class T1, class T2>
inline bool chmin(T1 &a, const T2 &b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

constexpr ll INF = 0x3f3f3f3f3f3f3f3fLL;
constexpr ll mod = 1000000007;

int main() {
    ll N;
    cin >> N;
    vl A(N);
    for (int i = 0; i < N; ++i) {
        cin >> A[i];
    }
    vl B(N);
    for (int i = 0; i < N; ++i) {
        cin >> B[i];
    }

    int j = 0;
    ll bef = -1;
    for (int i = 0; i < N; ++i) {
        if (A[i] != bef) j = 0;
        if (A[i] == B[i]) {
            bool isNG = true;
            for (; j < N; ++j) {
                if (A[j] != B[i] && B[j] != A[i]) {
                    swap(B[i], B[j]);
                    isNG = false;
                    break;
                }
            }
            if (isNG) {
                cout << "No" << endl;
                return 0;
            }
        }
        bef = A[i];
    }

    cout << "Yes" << endl;
    for (int i = 0; i < N; ++i) {
        cout << B[i] << " ";
    }
    cout << endl;
}

Measured memory_bytes: 6424
//AC
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using vec = vector<int>;
using vec2 = vector<vector<int>>;

int main(){
  rep(i, 5){
      int x;
      cin >> x;
      if(x == 0){
          cout << i+1 << endl;
          break;
      }
  }
}


Measured memory_bytes: 3588
# -*- coding: utf-8 -*-

'''
akasaka

'''

import sys

S = input()

for i in range(len(S)):
    # print(i, len(S)-1 - i)
    if not S[i] == S[len(S)-1 - i]:
        print('No')
        sys.exit()


newS = list(S)[:int((len(S)-1)/2)]
for i in range(len(newS)):
    if not newS[i] == newS[len(newS) - 1 - i]:
        print('No')
        sys.exit()

newS = list(S)[int((len(S)+3)/2 - 1):]
for i in range(len(newS)):
    if not newS[i] == newS[len(newS) - 1 - i]:
        print('No')
        sys.exit()

print('Yes')






Measured memory_bytes: 3064
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int N, M;
  cin >> N >> M;

  if ( N > 9 || M > 9) {
    cout << -1 << endl;
  } else {
    cout << N*M << endl;
  }

  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_map>
#include <functional>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cstdlib>

using namespace std;
typedef long long llong;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<llong, llong> pll;

int a, b, c;
llong k;
int main() {
    scanf("%d%d%d%lld", &a, &b, &c, &k);
    int ans = 0;
    switch (k % 2) {
    case 0:
        ans = a - b;
        break;
    case 1:
        ans = b - a;
        break;
    }
    printf("%d\n", ans);
	return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lean
{
    class Program
    {
        static void Main()
        {
            //long[] a = Console.ReadLine().Split().Select(long.Parse).ToArray();
            double L = int.Parse(Console.ReadLine());
            double n = L / 3;
            Console.WriteLine(n * n * n);
        }
    }
}


Measured memory_bytes: 13140
#include <bits/stdc++.h>

#define int64 long long
#define all(x) (x).begin(),(x).end()


using namespace std;

int main() {
	int64 N, M;
	cin >> N >> M;
	vector<int64> A(N, 0);
	for (int64 i = 0; i < N; i++) {
		cin >> A[i];
	}
	int64 sumVote = (int64)accumulate(all(A), 0);
	double minVote = (sumVote / (4.0 * M));
	sort(all(A), greater<int64>());
	for (int64 i = 0; i < M; ++i) {
		if (A[i] < minVote) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}


Measured memory_bytes: 256
input = readlines()

n = input.shift.chomp.to_i
list = []
(1..n).each do |x|
  list.push(input.shift.chomp.to_i)
end

tmp = nil
list.each do |l|
  if tmp.nil?
    tmp = l
    next
  end
  tmp = l.lcm(tmp)
end

puts tmp


Measured memory_bytes: 14344
using System;

namespace cont3
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int total =0;
            for(int i=0;i<=n;i++)
            {
                total += i;
            }

            Console.WriteLine(total);
        }
    }
}

Measured memory_bytes: 27492
#if !defined(__clang__) && defined(__GNUC__)
#include <bits/stdc++.h>
#else
#include <cstdlib>
#include <climits>
#include <iostream>
#include <cstdint>
#include <vector>
#include <string>
#include <complex>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <utility>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <regex>
#endif //  !defined(__clang__) && defined(__GNUG__)
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/multi_array.hpp>
#include <boost/optional.hpp>
#include <boost/math/common_factor_rt.hpp>  // https://boostjp.github.io/tips/math.html
#include <boost/dynamic_bitset.hpp>  // https://boostjp.github.io/tips/dynamic_bitset.html

constexpr int64_t DIV1097 = 1000000007LL;

using namespace std;

template <typename Tlist, typename Tfunc>
void __combination(
    Tlist const& list, typename Tlist::size_type const n, Tfunc const& func,
    Tlist& tmp, typename Tlist::size_type const i, typename Tlist::size_type const j)
{
    if (i == n)
    {
        func(tmp);
        return;
    }

    for (typename Tlist::size_type k = j; k != list.size() + (1 + i- n); ++k)
    {
        tmp[i] = list[k];
        __combination(list, n, func, tmp, i + 1, k + 1);
    }
}

template <typename Tlist, typename Tfunc>
void combination(
    Tlist const& list, typename Tlist::size_type const n, Tfunc const& func)
{
    Tlist tmp(n);
    __combination(list, n, func, tmp, 0, 0);
}

/*
  uint64_t sum = 0;
  combination(inis, 3, [&sum](auto& v) {
  sum += std::accumulate(std::begin(v), std::end(v), 1ULL, [](auto acc, auto nn) {
  return acc*nn;
  });
  });
*/


int main()
{
    int64_t N;
    std::cin >> N;

    std::vector<int64_t> M(5);

    for (decltype(N) i = 0; i < N; ++i) {
        std::string s;
        std::cin >> s;

        int idx;
        switch (s[0]) {
        case 'M':
            M[0]++;
            break;
        case 'A':
            M[1]++;
            break;
        case 'R':
            M[2]++;
            break;
        case 'C':
            M[3]++;
            break;
        case 'H':
            M[4]++;
            break;
        default:
            break;
        }
    }

    uint64_t sum = 0;
    combination(M, 3, [&sum](auto& v) {
            sum += v[0] * v[1] * v[2];
        });

    std::cout << sum << std::endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

typedef long long   signed int LL;
typedef long long unsigned int LU;

#define incID(i, l, r) for(int i = (l)    ; i <  (r); i++)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); i--)
#define  inc(i, n) incID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define  dec(i, n) decID(i, 0, n)
#define dec1(i, n) decII(i, 1, n)

#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))

#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define PQ priority_queue

#define  ALL(v)  v.begin(),  v.end()
#define RALL(v) v.rbegin(), v.rend()
#define  FOR(it, v) for(auto it =  v.begin(); it !=  v.end(); ++it)
#define RFOR(it, v) for(auto it = v.rbegin(); it != v.rend(); ++it)

template<typename T> bool   setmin(T & a, T b) { if(b <  a) { a = b; return true; } else { return false; } }
template<typename T> bool   setmax(T & a, T b) { if(b >  a) { a = b; return true; } else { return false; } }
template<typename T> bool setmineq(T & a, T b) { if(b <= a) { a = b; return true; } else { return false; } }
template<typename T> bool setmaxeq(T & a, T b) { if(b >= a) { a = b; return true; } else { return false; } }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }

// ---- ----

int n, m, d[200000], t[200000];
map<int, int> mp;

int main() {
	cin >> n;
	inc(i, n) { cin >> d[i]; }
	cin >> m;
	inc(i, m) { cin >> t[i]; }
	
	inc(i, n) { mp[d[i]]++; }
	inc(i, m) { mp[t[i]]--; }
	
	bool ans = true;
	FOR(it, mp) {
		if(it -> SE < 0) { ans = false; }
	}
	
	cout << (ans ? "YES" : "NO") << endl;
	
	return 0;
}


Measured memory_bytes: 11136
n=int(input())
a=list(map(int,input().split()))
print(' '.join(list(map(str,a))))
for i in range(1,n):
	v=a[i]
	j=i-1
	while j>=0 and a[j]>v:
		a[j+1]=a[j]
		a[j]=v
		j-=1
	print(' '.join(list(map(str,a))))


Measured memory_bytes: 5600
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())

typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> V;
typedef map<int, int> M;

const ll INF = 1e18;
const ll MOD = 1e9 + 7;

int main()
{
    int n;
    cin >> n;
    if (n == 1)
    {
        cout << "Hello World" << endl;
        return 0;
    }

    int a, b;
    cin >> a >> b;
    cout << a + b << endl;

    return 0;
}

Measured memory_bytes: 764
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author champon
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define inf 1e18
#define ceill(a, b) (a+b-1)/b
#define ok cout << "ok" << endl;
#define sp << " " <<
ll mod = 1e9+7;
void ans(bool b, ostream& out=cout){ out << (b ? "Yes" : "No") << endl; }
void ans2(bool b, ostream& out=cout){ out << (b ? "YES" : "NO") << endl; }
template<typename T> inline bool chmax(T &a, T b){ if(a<b) a=b; return a<b; }
template<typename T> inline bool chmin(T &a, T b){ if(b<a) a=b; return b<a; }
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){fill((T*)array, (T*)(array+N), val);}
int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, -1, -1, 1};

#ifndef INCLUDE_DEBUG_HPP
#define INCLUDE_DEBUG_HPP

class debug
{
public:
    template<typename T> void vdeb(T vec);
    template<typename T1, typename T2> void adeb(T1 *arr, T2 n);
    template<typename T> void mdeb(T mp);
};

#endif //INCLUDE_DEBUG_HPP

template<typename T> void debug::vdeb(T vec)
{
    cout << "#vector set debug" << endl;
    for(auto vv : vec) cout << vv << " ";
    cout << endl;
}

template<typename T1, typename T2> void debug::adeb(T1 *arr, T2 n)
{
    cout << "#adebug" << endl;
    for(int i=0; i<=n; i++) cout << arr[i] << " ";
    cout << endl;
}

template<typename T> void debug::mdeb(T mp)
{
    cout << "#map pair debug" << endl;
    for(auto const& m : mp) cout << m.first sp m.second << endl;
}
debug dbg;

class AHEX {
public:
	void solve(std::istream& in, std::ostream& out)
	{
	    char x, y;
	    in >> x >> y;
	    if(x < y) out << "<" << endl;
	    else if(x==y) out << "=" << endl;
	    else out << ">" << endl;
	}
};


int main() {
	AHEX solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define task "abc171"
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
mt19937 mrand(random_device{}());
const ll mod = 1000000007;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// Head:
// Source:
const int maxn = 2e5 + 7;
int n;
int a[maxn], ans = 0;
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
#ifndef ONLINE_JUDGE
    freopen(task".inp","r",stdin);
    freopen(task".out","w",stdout);
#endif
    char  c;
    cin>>c;
    if (c >= 'a' && c <= 'z') cout<<'a'<<"\n";
    if (c >= 'A' && c <= 'Z') cout<<'A'<<"\n";

}



Measured memory_bytes: 3664
use proconio::{input, fastout};
use proconio::marker::Usize1;
use std::collections::HashMap;

#[fastout]
fn main() {
    input! {
        n: usize,
        k: usize,
        ax: [Usize1; n],
    }

    let mut hm: HashMap<usize,usize> = HashMap::new();

    let mut count = 0;
    let mut cur = 0;
    let mut i = 0;
    let mut a = 0;
    while i < k {
        count += 1;
        if let Some(&item) = hm.get(&cur) {
            a = (k - i) % (count - item);
            break;
        }
        hm.insert(cur, count);
        cur = ax[cur];
        i += 1;
    }

    for _ in 0..a {
        cur = ax[cur];
    }
    println!("{}", cur+1);
}

Measured memory_bytes: 11472
#include<bits/stdc++.h>

using namespace std;

int main()
{
  while(1){
    int n;
    cin>>n;
    if(n == 0){
      break;
    }

    vector<int> step;
    for(int i = 0;i < n;++i){
      string s;
      cin>>s;

      if(s == "lu"){
        step.push_back(0);
      }
      else if(s == "ld"){
        step.push_back(1);
      }
      else if(s == "ru"){
        step.push_back(2);
      }
      else{
        step.push_back(3);
      }
    }

    bool left = 0;
    bool right = 0;
    bool cases = 0; 
    int ans = 0;
    for(int e : step){
      if(e == 0){
        left = 1;
      }
      else if(e == 1){
        left = 0;
      }
      else if(e == 2){
        right = 1;
      }
      else{
        right = 0;
      }

      if(cases == 0 && left == 1 && right == 1){
        ++ans;
        cases = 1;
      }
      else if(cases == 1 && left == 0 && right == 0){
        ++ans;
        cases = 0;
      }
    }

    cout<<ans<<endl;
  }
  
  return 0;
}


Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;

#define rep(i,s,n) for (int i = (int)s; i < (int)n; i++)
#define ll long long
#define pb push_back
#define All(x) x.begin(), x.end()
#define Range(x, i, j) x.begin() + i, x.begin() + j
#define lbidx(x, y) lower_bound(x.begin(), x.end(), y) - x.begin()
#define ubidx(x, y) upper_bound(x.begin(), x.end(), y) - x.begin()
#define BiSearchRangeNum(x, y, z) lower_bound(x.begin(), x.end(), z) - lower_bound(x.begin(), x.end(), y)turn idx;
#define deg_to_rad(deg) ((((double)deg)/((double)360)*2*M_PI))
#define rad_to_deg(rad) ((((double)rad)/(double)2/M_PI)*(double)360)

template<class T>
inline bool chmax(T &a, T b) {
  if(a < b) {
    a = b;
    return true;
  }
  return false;
};

template<class T>
inline bool chmin(T &a, T b) {
  if(a > b) {
    a = b;
    return true;
  }
  return false;
};

int main() {
  ll A, B, K;
  cin >> A >> B >> K;

  if (A + B <= K) {
    cout << 0 << ' ' << 0 << endl;
    return 0;
  } else {
    if (A <= K) {
      cout << 0 << ' ' << A + B - K << endl;
    } else {
      cout << A - K << ' ' << B << endl;
    }
  }


};


Measured memory_bytes: 256
import java.util.*;
import java.io.*;
public class Main
{
	public static void main(String args[]) throws IOException{
		BufferedReader in = new BufferedReader();
		int n =in.nextInt(), m = in.nextInt();
		int[] ms = new int[m];
		for(int i=0; i<m; i++){
			n-=in.nextInt();
		}
		out((n<0?-1:n)+"");
		
	}
	static void out(String s){
		System.out.print(s);
	}
}



class BufferedReader 
{ 
    java.io.BufferedReader br; 
    StringTokenizer st; 

    public BufferedReader() 
    { 
        br = new java.io.BufferedReader(new
                    InputStreamReader(System.in)); 
    } 

    public String next() 
    { 
        while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } 

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

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

    public double nextDouble() 
    { 
        return Double.parseDouble(next()); 
    } 

    public String nextLine() 
    { 
        String str = ""; 
        try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } 
        return str; 
    } 
}

Measured memory_bytes: 39416
#include <bits/stdc++.h>

using namespace std;

#define REP1(i,n) for(int i=1, i##_len=(n); i<i##_len; ++i)
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define pow(x) x*x
#define ll long long
static const ll MAX = 1000000;
static const ll INFTY = 1e12;
static const ll MOD = 1000000007;

template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };

struct edge {
    ll to, cost;
};

using Graph = vector<vector<int>>;
using _Graph = vector<vector<edge>>;


const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

// 深さ優先探索
vector<bool> seen;
vector<int> colors;

int H, W, N;
int sx, sy, gx, gy; 
vector<vector<char>> field;
vector<vector<int>> dist;
//vector<pair<int, int>> gx, gy;
deque<pair<int, int>> que;

typedef vector<vector<int> > Matrix;

const int INF = 100000000;


int main() {

    int N, M;
    cin >> N >> M;
    // vector<pair<int, int>> gate(M); 
    vector<int> L(M), R(M);
    REP(i, M){
        cin >> L[i] >> R[i];
        // cin >> gate[i].second >> gate[i].first;
    }

    sort(L.begin(), L.end(), greater<int>());
    sort(R.begin(), R.end());
    cout << max(R[0] - L[0] + 1, 0) << endl;
    // sort(gate.begin(), gate.end());
    // REP(i, N)swap(gate[i].first, gate[i].second);



   

}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/


Measured memory_bytes: 1024
#include  <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
using namespace std;

const int vmax = 5010;
const int inf = 1 << 29;
struct edge {int to, cap, rev; bool original;};
vector<edge> graph[vmax];
int level[vmax], iter[vmax];

void add_edge(int from, int to, int cap) {
	graph[from].push_back({to, cap, (int)graph[to].size(), true});
	graph[to].push_back({from, 0, (int)graph[from].size() - 1, false});
}

int dfs(int v, int t, int f) {
	if (v == t) return f;
	for (int &i = iter[v]; i < graph[v].size(); i++) {
		edge &e = graph[v][i];
		if (e.cap > 0 && level[v] < level[e.to]) {
			int d = dfs(e.to, t, min(f, e.cap));
			if (d == 0) continue;
			e.cap -= d; graph[e.to][e.rev].cap += d;
			return d;
		}
	}
	return 0;
}

int bfs(int s, int t) {
	rep(i, vmax) level[i] = -1;
	queue<int> q;
	level[s] = 0, q.push(s);
	while (!q.empty()) {
		int v = q.front(); q.pop();
		for (auto &e : graph[v]) {
			if (e.cap > 0 && level[e.to] < 0) {
				level[e.to] = level[v] + 1;
				q.push(e.to);
			}
		}
	}
	return level[t] >= 0;
}


int max_flow(int s, int t) {
	int flow = 0;
	while (bfs(s, t)) {
		rep(i, vmax) iter[i] = 0;
		while (1) {
			int f = dfs(s, t, inf);
			if (f == 0) break;
			flow += f;
		}
	}
	return flow;
}

int flow(int s, int t) {
	if (!bfs(s, t)) return 0;
	rep(i, vmax) iter[i] = 0;
	return dfs(s, t, 1);
}

int add(int from, int to, int s, int t) {
	add_edge(from, to, 1);
	add_edge(to, from, 1);
	return flow(s, t);
}

int erase(int from, int to, int s, int t) {
	int ft = 0;
	for (auto &e : graph[from]) {
		if (e.to == to && e.original) {
			if (graph[e.to][e.rev].cap == 1) ft++;
			e.cap = 0, graph[e.to][e.rev].cap = 0;
		}
	}

	for (auto &e : graph[to]) {
		if (e.to == from && e.original) {
			if (graph[e.to][e.rev].cap == 1) ft--;
			e.cap = 0, graph[e.to][e.rev].cap = 0;
		}
	}

	if (ft == 0) return 0;

	if (ft > 0 && flow(from, to) == 1) return 0;
	if (ft < 0 && flow(to, from) == 1) return 0;

	if (ft > 0)flow(t, to), flow(from, s);
	if (ft < 0)flow(t, from), flow(to, s);
	return -1;
}


void show(int n) {
	rep(i, n)for (auto &e : graph[i]) if (e.original)
			cout << i << " -> " <<  e.to << " : " << graph[e.to][e.rev].cap << endl;
}

int a[5010], b[5010], c[5010];


int main(void) {
	int n, m;
	cin >> n >> m;

	rep(i, m) {
		cin >> a[i] >> b[i] >> c[i];
		add_edge(a[i] , b[i] , c[i]);
		add_edge(b[i] , a[i] , c[i]);
	}

	int cur = max_flow(0, n - 1);
	int ans = cur;

	rep(i, m) {
		if (c[i] != 1) continue;
		if (erase(a[i] , b[i] , 0, n - 1) == -1) ans = min(ans, cur - 1);
		add(a[i] , b[i] , 0, n - 1);
	}

	if (ans > 10000) ans = -1;
	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 4084
#include <bits/stdc++.h>
using namespace std;

int main() {
  int n; cin >> n; double ans = 0;
  for (int i = 0; i < n; i++) {
    double x; string u;
    cin >> x >> u;
    ans += (u == "JPY" ? x : x * 380000);
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
//人正是因为度过了一段阴暗岁月，才会更渴求黎明的曙光
//青春不能回头。所以青春也没有终点。
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <memory.h>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
using namespace std;

#define REP(i,n) for(int (i)=0; i<(int)(n); i++)

const int MAXN = 0;
bool run(string s) {
	string t = s;
	reverse(t.begin(), t.end());
	if(t == s) return true;
	else return false;
}

int main(void) {
	string s,tmp1,tmp2;
	cin >> s;
	int N = s.size();
	if(run(s) == false) {
		cout << "No" << endl;
		return 0;
	}
	s = "*"+s;
	tmp1 = s.substr(1, (N-1)/2);
	tmp2 = s.substr((N+3)/2, N-(N+3)/2+1);
	if(run(tmp1) && run(tmp2)) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}




Measured memory_bytes: 256
//abc120_b.cpp
//Tue Mar  5 21:40:03 2019

#include <iostream>
#include <string>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#define INTINF 2147483647
#define LLINF 9223372036854775807
using namespace std;
using ll=long long;
typedef pair<int,int> P;

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

	int num = min(a,b);
	int ans = num;
	while (k>0){
		if (a%num==0 && b%num==0){
			k--;
			ans = num;
		}
		num--;
	}


	cout << ans << endl;
//	printf("%.4f\n",ans);
}

Measured memory_bytes: 256
#include <bits/stdc++.h>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define watch(a) { std::cout << #a << " = " << a << "\n"; }
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }
template<class T, class V> istream& operator>> (istream& ist, pair<T, V>& p) { return ist >> p.first >> p.second; }
template<class T> ostream& operator<< (ostream& ost, pair<T, T>& p) { return ost << p.first << ", " << p.second; }
template<class T> istream& operator>> (istream& ist, vector<T>& vs) { for(auto& e: vs) ist >> e; return ist; }

typedef long long ll;
int const inf = INT_MAX / 2;

vector<vector<int>> G;
vector<int> S;

void dfs(int par, int curr, int sum) {
  S[curr] += sum;
  rep(i, G[curr].size()) {
    if (G[curr][i] == par) { continue; }
    dfs(curr, G[curr][i], S[curr]);
  }
}

int main() {
  int N, Q; cin >> N >> Q;
  G.resize(N), S.resize(N);
  rep(i, N - 1) {
    int a, b; cin >> a >> b;
    a--, b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  rep(i, Q) {
    int p, x; cin >> p >> x;
    p--;
    S[p] += x;
  }
  dfs(-1, 0, 0);
  rep(i, N) {
    if (i) cout << " ";
    cout << S[i];
  }
  cout << "\n";
}


Measured memory_bytes: 23424
#include <bits/stdc++.h>

#define rep(i, n) for(int i=0; i < n; i++)
#define REP(i, n, m) for(int i=n; i < m; i++)
#define reps(i, n) for(int i=1; i <= n; i++)
#define ALL(v) v.begin(), v.end()
#define rALL(v) v.rbegin(), v.rend()
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)

using namespace std;
using ll=long long;

ll mod=1000000007;

const ll INF = 1LL << 60;

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

int n;

// index が条件を満たすかどうか
bool isOK(ll x[],int index, ll key) {
    if (x[index] > key) return true;
    else return false;
}

// index が条件を満たすかどうか
bool isOK2(ll x[],int index, ll key) {
    if (x[index] < key) return true;
    else return false;
}


// 汎用的な二分探索のテンプレ
int binary_searchb(ll x[],ll key) {
    int left = -1; //「index = 0」が条件を満たすこともあるので、初期値は -1
    int right = n; // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()

    /* どんな二分探索でもここの書き方を変えずにできる！ */
    while (right - left > 1) {
        int mid = left + (right - left) / 2;

        if (isOK(x,mid, key)) right = mid;
        else left = mid;
    }

    /* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
    return right;
}

// 汎用的な二分探索のテンプレ
int binary_searchs(ll x[],ll key) {
    int left = -1; //「index = 0」が条件を満たすこともあるので、初期値は -1
    int right = n; // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()

    /* どんな二分探索でもここの書き方を変えずにできる！ */
    while (right - left > 1) {
        int mid = left + (right - left) / 2;

        if (isOK2(x,mid, key)) left = mid;
        else right = mid;
    }

    /* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
    return left;
}

int main(){
  cin>>n;
  ll a[n],b[n],c[n];
  rep(i,n)cin>>a[i];
  rep(i,n)cin>>b[i];
  rep(i,n)cin>>c[i];
  sort(a,a+n);
  sort(b,b+n);
  sort(c,c+n);
  ll ans=0;
  rep(i,n){
    ll bs=b[i];
    ll x=n-binary_searchb(c,bs);
    ll y=1+binary_searchs(a,bs);
    ans += x*y;
  }
  cout <<ans;
}

Measured memory_bytes: 2560
#include<bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define REP(i, n) for(int i = 0;i < (n);++i)
#define RREP(i, n) for(int i = (n)-1; i >= 0; --i)

#define endl '\n'
#define pb push_back
#define eb emplace_back
#define pque priority_queue
#define umap unordered_map
#define BIG 2000000000
#define VERYBIG 1000000000000000ll
#define PI 3.14159265358979
#define coutdb cout<<fixed<<setprecision(15)

const int dx[]={1,0,-1,0,1,1,-1,-1}, dy[]={0,-1,0,1,1,-1,1,-1};
const long long MOD = 1e9+7;

// typedef int_fast64_t ll;
#define int int_fast64_t

template<typename T> inline T GCD(T a,T b){T c;while(b!=0){c=a%b;a=b;b=c;}return a;}
template<typename T> inline T LCM(T a,T b){T c=GCD(a,b);a/=c;return a*b;}
template<typename T> inline T nCr(T a,T b){T i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
template<typename T> inline T nHr(T a,T b){return nCr(a+b-1,b);}

typedef pair<int, int> INTP;
typedef vector<int> INTV;
struct edge2 {int to, cost;};
struct edge3 {int from, to, cost;};

signed main(void){
  cin.tie(0);
  ios::sync_with_stdio(false);

  double a, b, x; cin >> a >> b >> x;
  x /= a;
  if(x <= a*b/2.0){
    double p = x*2.0/b;
    double q = sqrt(b*b+p*p);
    double COS = (p*p+q*q-b*b)/(2*p*q);
    coutdb << acos(COS) * 180.0 / PI << endl;
  } else {
    double amari = a*b - x;
    // coutdb << amari << endl;
    double p = amari*2.0/a;
    double TAN = p/a;
    coutdb << atan(TAN) * 180.0 / PI << endl;
  }
}

Measured memory_bytes: 512
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cstring>
#include<cmath>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<bitset>

using namespace std;

int main(){	
	string str;
	cin>>str;
	int p=0;
	int n=0;
	int used=0;
	for(int i=0;i<str.size();++i){
		if(str[i]=='g'){
			if((used+1)*2<=i+1){
				++used;
				++p;
			}
		}
		else{
			if((used+1)*2>i+1){
				++n;
			}
			else{
				++used;
			}
		}
	}
	cout<<p-n<<endl;
	return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
#define int long long int

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N; cin >> N;
    for (int i = 1; i <= 3500; i++) {
        for (int j = i; j <= 3500; j++) {
            int up = N * i * j;
            int down = 4 * i * j - N * (i + j);
            if (down <= 0) continue;
            if (up % down == 0 && up/down >= j) {
                printf("%lld %lld %lld\n",i, j, up/down);
                return 0;
            }
        }
    }

    return 0;
}


Measured memory_bytes: 256