jiahuimbzuai/CoQuIR huggingface dataset:
//  [typescript]
import * as fs from "fs";
const input = fs.readFileSync("/dev/stdin", "utf-8");

const main = (input: string): void => {
  const [a, b, c] = input.split("\n").map((str) => str.split(""));
  let next = "";
  let now = a[0];

  for (let i = 0; i < 300; i++) {
    if (now === "a") next = a.shift() ?? "";
    else if (now === "b") next = b.shift() ?? "";
    else if (now === "c") next = c.shift() ?? "";

    if (next === "") {
      console.log(now.toUpperCase());
      break;
    } else now = next;
  }
};

main(input);
//  [typescript]
import * as fs from "fs";
const input = fs.readFileSync("/dev/stdin", "utf-8");

const main = (input: string): void => {
  const [a, b, c] = input.split("\n").map((str) => str.split(""));

  const term = (str: string, next = "") => {
    if (str === "a") next = a.shift() ?? "";
    else if (str === "b") next = b.shift() ?? "";
    else if (str === "c") next = c.shift() ?? "";

    if (next === "") console.log(str.toUpperCase());
    else term(next);
  };

  term(a[0]);
};

main(input);
//  [python]
N = int(input())

for i in range(15):
    if N - 7 * i >= 0:
        if (N - 7 * i) % 4 == 0:
            print("Yes")
            exit()

print("No")
//  [python]
n = int(input())
for i in range(26):
    for j in range(16):
        if 4*i + 7*j == n:
            print("Yes")
            exit()
print("No")
//  [python]
n = int(input())

flag = False

for i in range(0,101,7):
    for j in range(0,101,4):
        if n == i + j:
            flag = True
            break
    if flag:
        break
if flag:
    print("Yes")
else:
    print("No")
//  [python]
import sys

N = int(input())

for i in range(N//4):
    if (N-4*i)%7 == 0:
        print("Yes")
        sys.exit()

print("No")
//  [python]
N, K = map(int, input().split())
h = list(map(int, input().split()))

INF = 10**9
dp = [INF] * (N + K)
dp[0] = 0
for i in range(N):
    for k in range(1, K+1):
        if i + k >= N:
            break
        dp[i+k] = min(dp[i+k], dp[i] + abs(h[i]-h[i+k]))
print(dp[N-1])
//  [python]
n=int(input())
if n==4 or n==7 or n==11 or n==12 or n==14 or n==15 or n>=18:
    print("Yes")
else:
    print("No")
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    if(n==1||n==2||n==3||n==5||n==6||n==9||n==10||n==13||n==17)
      System.out.println("No");
    else
      System.out.println("Yes");
  }
}
//  [java]
import java.io.*;
import java.util.*;

public class Main {
	private static final int READ_COUNT = 1;
	private static List<String> strList = new ArrayList<>();
	
	public static void main(String[] args) {
		read();
		
		int n = Integer.parseInt(strList.get(0));
		
		if (n % 4 == 0 || n % 7 == 0) {
			System.out.println("Yes");
			return;
		}
		
		for (int i = 1, iLen = n / 7; i <= iLen; i++) {
			if ((n - (i * 7)) % 4 == 0) {
				System.out.println("Yes");
				return;
			}
		}
		
		System.out.println("No");
	}
	
	private static void read() {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			for (int i = 0; i < READ_COUNT; i++) {
				strList.add(br.readLine());
			}
		} catch (IOException e) {
		}
	}
}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		new Solution();
	}

}

class Solution {

	private int n;

	public Solution() {
		this.setScanner();
		this.run();
	}

	private void setScanner() {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		sc.close();
	}

	private void run() {

		if (n < 4) {
			System.out.println("No");
			return;
		}

		int max = 100 / 4;

		for (int cake = 0; cake < max; cake++) {
			for (int donuts = 0; donuts < max - cake; donuts++) {
				if (4 * cake + 7 * donuts == n) {
					System.out.println("YES");
					return;
				}
			}
		}

		System.out.println("No");
	}

}
//  [java]
import java.util.*;
public class Main {
	//定義関数から参照できる変数定義はこの辺
	static int N;
	static String ans = "No";



	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
		N = sc.nextInt();
		for(int i=1;i<=25;i++){
			for(int j=1;j<=25;j++){
				if (N==(4*i+7*j)) {
					ans="Yes";
				}
			}
		}
		System.out.println(ans);
		//System.out.print(ans);
    }
}
//  [java]
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    
    for (int c = 0; c <= 25; c++) {
      for (int d = 0; d <= 14; d++) {
        int total = 4*c + d*7;
        if (total == N) System.out.println("Yes");
        else System.out.println("No");
      }
    }
  }
}
//  [cpp]
#include <stdio.h>

int a;
int b;
int c;

int main() {


	scanf("%d", &a);

	b = a % 7;

	bool o = false;

	for (; b <= a; b += 7) {
		if (b % 4 == 0) o = true;
	}

	if ( o ) {
		printf("Yes\n");
	}
	else {
		printf("No\n");
	}



	return 0;

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

int main()
{
	int n;
	scanf("%d", &n);

	for (int i = 0; i * 4 <= n; i++)
	{
		if (!((n - i * 4) % 7))
		{
			printf("Yes\n");
			return 0;
		}
	}
	printf("No\n");

	return 0;
}
//  [cpp]
#include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
#define NIL -2000000001
#define MAX 2000000000000

int main() {
  int n;
  scanf("%d", &n);
  bool a[n+1];
  a[0] = true;
  for (int i=1; i<=n; i++) {
    if (i-7<0) {
      if (i == 4) {
        a[i]= true;
      } else {
        a[i] = false;
      }
      continue;
    }
    if (a[i-4] || a[i-7]) {
      a[i] = true;
    } else {
      a[i] = false;
    }
  }
  if (a[n]) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
//  [cpp]
#include <math.h>
#include <stdio.h>

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>

//コンパイラ最適化
#pragma GCC optimize("Ofast")

/*

 */
//マクロ
// forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
// Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
// FORAは範囲for文(使いにくかったら消す)
#define REP(i, n) for (ll i = 0; i < ll(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= ll(b); i--)
#define FORA(i, I) for (const auto &i : I)
// xにはvectorなどのコンテナ
#define ALL(x) x.begin(), x.end()
#define SIZE(x) ll(x.size())
#define SORT(x) sort(x.begin(), x.end())
//定数
#define INF 1000000000000  // 10^12:∞
#define MOD 1000000007     // 10^9+7:合同式の法
#define MAXR 100000        // 10^5:配列の最大のrange
//略記
#define PB push_back  //挿入
#define MP make_pair  // pairのコンストラクタ
#define F first       // pairの一つ目の要素
#define S second      // pairの二つ目の要素

typedef long long ll;

using namespace std;
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i += 4) {
    int num = N - i;
    if (num % 7 == 0) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  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;

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

  rep(i, N / 4) {
    rep(j, N / 7) {
      if (i * 4 + j * 7 == N) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
//  [cpp]
#include <iostream>
#include <bitset>
#include <vector>
using namespace std;

int main() {

    int N;

    cin >> N;

    int y4;
    int y7;

    int a = N / 7;
    int b = (N / 4);

    if (N % 7 == 0 || N % 4 == 0 ){
        cout << "Yes" << endl;
        return 0;
    }


    for (int i = 0; i <= b + 1; i++){
        int aa = 4 * i;
        int bb = 7 * (b - i + 1);

        if (aa + bb == N){
            cout << "Yes" << endl;
            return 0;
        }
    }

    cout << "No" << endl;




}
//  [c]
char f[999];int i,n;
main(){
	scanf("%d",&n);
	f[0]=1;
	for(i=0;i<n;i++)
		if(f[i])f[i+4]=f[i+7]=1;
	puts(f[n]?"Yes":"No");
	return 0;
}
//  [c]
#include <stdio.h>

int main(void){
  int N, i, j, x=0;
  scanf("%d", &N);
  N = N % 28;
  for(i=0; i<=7; i++){
    for(j=0; j<=4; j++){
      if(4*i + 7*j == N){
        x = 1;
      }
    }
  }
  if(x == 0){
    printf("No\n");
  }else{
    printf("Yes\n");
  }
  return 0;
}
//  [c]
#include <stdio.h>
int main(){
  int i,j,n,x;
  scanf("%d",&n );
for(i=0;i<14;i++){
  for(j=0;j<26;j++){
    x=7*i+4*j;
  if(x==n){
printf("Yes");
return 0;
   }
 }
}
printf("No");
}
//  [c]
#include<stdio.h>
int main()
{
int x,i,sw,k;
  sw=0;
  scanf("%d",&x);
  
  if(x>=28) printf("Yes");
  k=x/7;
  else {
  for(i=0;i<=k;i++){
    if(x%4==0) sw++; 
    x=x-7;
   }
  if(sw==0) printf("No");
    else printf("Yes");
  }


return 0;}
//  [c]
#include<stdio.h>
int main()
{
int x,i,sw,k;
  sw=0;
  scanf("%d",&x);
  k=x/7;
  if(x>=28) printf("Yes");
  
  else {
  for(i=0;i<k;i++){
    if(x%4==0) sw++; 
    x=x-7;
   }
  if(sw==0) printf("No");
    else printf("Yes");
  }


return 0;}
//  [c]
#include<stdio.h>
int main()
{
int x,i,sw,k;
  sw=0;
  scanf("%d",&x);
  
  if(x>=28) printf("Yes");
  k=x/7;
  else {
  for(i=0;i<k;i++){
    if(x%4==0) sw++; 
    x=x-7;
   }
  if(sw==0) printf("No");
    else printf("Yes");
  }


return 0;}
//  [javascript]
function main(input) {
  var N = input[0]-0;
  for(var i=0;i<N;i++){
    for(var j=0;j<N;j++){
      if(i*4+j*7 == N){
        console.log('Yes');
        return;
      }
    }
  }
  console.log('No');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
//  [javascript]
'use strict'

function main(input) {

  let n = Number(input);
  let ans = 'No';

  while (n >= 0) {
    if (n % 7 === 0) {
      ans = 'Yes';
      break;
    }
    n -= 4;
  }

  console.log(ans);
}

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

function main(input) {
  const N = ~~input
  const cake = 4
  const donut = 7
  // let ans;

  for (let i = 0; i <= Math.ceil(N / cake); i++) {
    for (let j = 0; j <= Math.ceil(N / donut); j++) {
      if (cake * i + donut * j === N) {
        console.log("Yes")
        return false
      }
    }
  }

  console.log("No")
}

main(require("fs").readFileSync("/dev/stdin", "utf8"))
//  [javascript]
function Main(input) {
  let result = false;
  if (input % 7 == 0) {
    result = true;
  }
  if (input % 4 == 0) {
    result = true;
  }
  if (input % 11 == 0) {
    result = true;
  }
  if (input % 15 == 0) {
    result = true;
  }
  if (input % 18 == 0) {
    result = true;
  }
  console.log(result ? 'Yes' : 'No');
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  let result = false;
  if (input % 7 == 0) {
    result = true;
  }
  if (input % 4 == 0) {
    result = true;
  }
  if (input % 11 == 0) {
    result = true;
  }
  console.log(result ? 'Yes' : 'No');
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  let result = false;
  if (input % 7 == 0) {
    result = true;
  }
  if (input % 4 == 0) {
    result = true;
  }
  if (input % 11 == 0) {
    result = true;
  }
  console.log(result ? 'yes' : 'no');
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	var cnt = 0
	for i := 0; i <= n; i++ {
		for j := 0; j <= n; j++ {
			if 4*i+7*j == n {
				cnt++
			}
		}
	}
	if cnt != 0 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import "fmt"

func main() {
  var N int
  cake := 4
  dounut := 7
  inc := 0
  fmt.Scan(&N)

  for c := 0; c * cake <= N; c++ {
    for d := 0; d * dounut <= N; d++{
      total := cake * c + dounut * d
      if N == total {
        inc ++
      }
    }
  }

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

import (
	"fmt"
)

var c, d int

func main() {
	var n int

	fmt.Scan(&n)
	c, d = 4, 7

	if helper(n) {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

func helper(money int) bool {
	if money%c == 0 {
		return true
	}

	if money%d == 0 {
		return true
	}

	if money >= c {
		return helper(money - c)
	}
	if money >= d {
		return helper(money - d)
	}

	return false
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)

	var fourNum int
	for {
		rest := n - fourNum*4
		if rest < 7 {
			fmt.Println("No")
			return
		}
		if rest%7 == 0 {
			fmt.Println("Yes")
			return
		}
		fourNum++
	}
}
//  [go]
package main

import "fmt"

func main() {
	// Code for B - Cakes and Donuts
	var N int
	fmt.Scanf("%d", &N)
	if (N%7)%4 == 0 || (N%4)%7 == 0 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}

func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	n := iScan()
	ans := "No"
	for i := 0; 7*i < n; i++ {
		if (n-7*i)%4 == 0 {
			ans = "Yes"
		}
	}
	fmt.Println(ans)
}
//  [ruby]
n = gets.to_i
sum = 0
(0..20).each do |i|
  (0..14).each do |j|
  	sum += 1 if (4 * i + 7 * j) == n
  end
end
if sum > 0
  puts :Yes
else
  puts :No
end
//  [ruby]
lines = gets.to_i
ary = []
for i in 0..25 do 
    for t in 0..15 do
      if 4*i + 7*t == lines
          ary << 1
      end 
    end
end

if ary.count != 0
    puts "Yes"
else
    puts "No"
end
//  [ruby]
N = gets.to_i
0.upto(N.div(4)) do |i|
    if (N-4*i) % 7 == 0
        puts 'Yes'
        exit
    end
end
puts 'No'
//  [ruby]
n=gets.to_i
(1..n).each do |i|
  (1..n).each do |j|
    next if i*4+j*7>n
    if i*4+j*7==n
      puts 'Yes'
      exit
    end
  end
end
puts 'No'
//  [ruby]
n = gets.chomp.to_i

if n % 4 == 0
  print "Yes"
elsif n % 7 == 0
  print "Yes"
else
  i, j = 0, 0
  while (i*4) <= n do
    while ((i*4)+(j*7)) <= n do
      if ((i*4)+(j*7)) == n
        print "Yes"
        return
      end
      j += 1
    end
    i += 1
  end
  print "No"
end
//  [ruby]
n = gets.chomp.to_i

i,j = 1
while true do
  while true do
    sum = i * 4 + j * 7
    if sum == n
      print "Yes"
      return
    elsif sum > n
      print "No"
      return
    end
    j += 1
  end
  i += 1
end
//  [rust]
use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<i32> = procon_read();
	let n = v[0];
	let up4 = n/4;
	let up7 = n/7;
	let mut flag = false;
	for i in 0..(up4+1) {
		for j in 0..(up7+1) {
			if 4*i + 7*j == n {
				flag = true;
				break;
			}
		}
		if flag {
			break;
		}
	}
	if flag {
		println!("Yes");
	}else{
		println!("No");
	}
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

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

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

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

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

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

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

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

fn main() {
    input!{
        n: u32,
    };
    for i in 0..26{
        for j in 0..15{
            if 4 * i + 7 * j == n {
                println!("Yes");
                return;
            }
        }
    }
    println!("No");
}
//  [rust]
use std::io::*;
use std::str::FromStr;

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

fn main() {
    let n: usize = read();
    let mut a: Vec<bool> = vec![false; 101];
    a[0] = true;

    for i in 0..n + 1 {
        if i <= 96 {
            if a[i] == true {
                a[i + 4] = true;
            }
        }
    }

    for i in 0..n + 1 {
        if i <= 93 {
            if a[i] {
                a[i + 7] = true;
            }
        }
    }

    println!(
        "{}",
        match a[n] {
            true => "Yes",
            false => "No",
        }
    );
}
//  [rust]
use std::io::*;
use std::str::FromStr;

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

fn main() {
    let n: usize = read();
    let mut a: Vec<bool> = vec![false; 101];
    a[0] = true;

    for i in 0..n + 1 {
        if i <= 96 {
            if a[i] == true {
                a[i + 4] = true;
            }
        }
    }

    for i in 0..n + 1 {
        if i <= 97 {
            if a[i] {
                a[i + 7] = true;
            }
        }
    }

    println!(
        "{}",
        match a[n] {
            true => "Yes",
            false => "No",
        }
    );
}
//  [rust]
use std::io::*;
use std::str::FromStr;

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

fn main() {
    let n: u32 = read();

    let mut ans = false;

    if n % 11 == 4 || n % 11 == 7 || n % 4 == 0 || n % 7 == 0 || n % 11 == 0 {
        ans = true;
    }

    println!("{}", if ans {"Yes"} else {"No"});
}
//  [rust]
use std::io::*;
use std::str::FromStr;

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

fn main() {
    let n: u32 = read();

    let mut ans = false;

    if n % 11 == 4 || n % 11 == 7 {
        ans = true;
    }

    println!("{}", if ans {"Yes"} else {"No"});
}
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/



/*************** メインプログラム ***************/

let N = readInt()!
var ans = "No"
for i in 0...N/7 {
    for j in 0...N/4 {
        if 7*i + 4*j == N {
            ans = "Yes"
            break
        }
    }
}
print(ans)
//  [swift]
let n = Int(readLine()!)!
var ans = "No"
for i in 0...n/4 {
  for j in 0...n/7 {
    if 4*i + 7*j == n {
      ans = "Yes"
    }
  }
}
print(ans)
//  [swift]
import Foundation
var count = 0
let N = Int(readLine()!)!
for i in 0 ... N/4+1 {
    for j in 0 ... N/7+1 {
        if 4*i + 7*j == N {
            count += 1
        }
    }
}
if count == 0 {
    print("No")
} else {
    print("Yes")
}
//  [swift]
import Foundation
var count = 0
let N = Int(readLine()!)!
for i in 0 ... N/4+1 {
    for j in 0 ... N/7+1 {
        if 4*i + 7*j == N {
            count += 1
        }
    }
}
if count == 0 {
    print("NO")
} else {
    print("YES")
}
//  [swift]
import Foundation
var count = 0
let N = Int(readLine()!)!
for i in 0 ... N/4 {
    for j in 0 ... N/7 {
        if 4*i + 7*j == N {
            count += 1
        }
    }
}
if count >= 1 {
    print("YES")
} else {
    print("NO")
}
//  [swift]
import Foundation
var count = 0
let N = 11//Int(readLine()!)!
for i in 0 ... N/4 {
    for j in 0 ... N/7 {
        if 4*i + 7*j == N {
            count += 1
        }
    }
}
if count >= 1 {
    print("YES")
} else {
    print("NO")
}
//  [typescript]
function Main(input){
	var args = input.split(/\n|\s/g);
	var N = parseInt(args[0],10);
var result = 'No';
for(let i=0;i<=N;i+=4){
  if((N-i)%7===0){result='Yes';break;}
}
  console.log(result);
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [typescript]
const log = console.log;

// ----

function Main(input: string): void {
  const n = parseInt(input);

  for (let cakesAmount = 0; cakesAmount <= n; cakesAmount += 4) {
    for (let totalAmount = cakesAmount; totalAmount <= n; totalAmount += 7) {
      if (totalAmount !== n) continue;

      log("Yes");

      return;
    }
  }

  log("No");
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const _n = stdin.trim().split('\n')
const n = Number(_n)

const ans = _ => {
  if (n < 4) return 'No'
  for (let i = 0; 4 * i <= n; i++) {
    for (let j = 0; 7 * j <= n; j++) {
      const ab = 4 * i + 7 * j
      if (ab === n) return 'Yes'
    }
  }
  return 'No'
}

console.log(ans())
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const _n = stdin.trim().split('\n')
const n = Number(_n)

const ans = _ => {
  for (let i = 1; 4 * i <= n; i++) {
    for (let j = 0; 7 * j <= n; j++) {
      const ab = 4 * i + 7 * j
      if (ab === n) return 'Yes'
    }
  }
  return 'No'
}

console.log(ans())
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const _n = stdin.trim().split('\n')
const n = Number(_n)

const ans = _ => {
  let i = 1

  while (1) {
    if (n < 4 || (n - i * 4) < 0) {
      return 'No'
    } else if ((n - i * 4) % 7 === 0) {
      console.log(i)
      return 'Yes'
    }
    i++
  }
}

console.log(ans())
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const _n = stdin.trim().split('\n')
const n = Number(_n)

const ans = _ => {
  let i = 1

  while (1) {
    if (n < 4) {
      return 'No'
    } else if ((n - i * 4) % 7 === 0) {
      return 'Yes'
    }
    i++
  }
}

console.log(ans())
//  [python]
n,r=map(int,input().split())
ans=r
if n<10:ans=r+100*(10-n)
print(ans)
//  [python]
N, R = map(int, input().split())
if N>10: N=10
print(R+(100*(10-N)))
//  [python]
n, r = map(int,input().split())
if n >= 10:
  print(r)
else:
  print(r + 100 * (10 - n))
//  [python]
N,R=map(int,input().split())
if N>=10:
    print(R)
else:
    print(R-100*(10-N))
//  [python]
n, r = map(int, input().split())

if n >= 10:
  print(r)
else:
  print(r-100*(10-n))
//  [python]
n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r-100*(10-r))
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws Exception {
    	Scanner sc = new Scanner(System.in);   		
    	int N = sc.nextInt();
    	int R = sc.nextInt();
    	if (N >=10) {
    		System.out.println(R);
    	}
    	else {
    		int inner = R + (100*(10-N));
    		System.out.println(inner);
    	}
    	
    		}
    }

class Pair
{
	long x;
	long y;
	
	public Pair(long x,long y) {
		this.x=x;
		this.y=y;
		
	}
}

class Scanner 
{
	StringTokenizer st;
	BufferedReader br;

	public Scanner(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.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
            int N=sc.nextInt();
            int X[] =new int[N];
            int total=0;
            for(int i=0;i<N;i++){
                X[i]=sc.nextInt();
                total+=X[i];
            }
            long C = Math.round((double)total/N);
            int ans=0;
            
            for(int j=0;j<N;j++){
                ans += Math.pow(X[j]-C, 2);
            }
        
        System.out.println(ans);
    }
}
//  [java]
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		bigdecimal N = sc.nextInt();
		bigdecimal K = sc.nextInt();
		bigdecimal count = 1;
		while (N >= K) {
			N = N / K;
			count++;
		}
		System.out.println(count);
		return ;
	}
}
//  [java]
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		float N = sc.nextInt();
		float K = sc.nextInt();
		float count = 1;
		while (N >= K) {
			N = N / K;
			count++;
		}
		System.out.println(count);
		return ;
	}
}
//  [cpp]
#include<cstdio>
using namespace std;
int main(){
	int a,b;
	scanf("%d%d",&a,&b);
	if(a>10){
	 printf("%d",b);
	 return 0;
}
else {
	b+=100*(10-a);
	printf("%d",b);
}
return 0;
}
//  [cpp]
#include<cstdio>
using namespace std;
int K,N;
int main(){
	scanf("%d%d",&K,&N);
	if(K<10){
		N=N+100*(10-K);
	}
	printf("%d\n",N);
	return 0;
}
//  [cpp]
#include<stdio.h>
//#include <stdlib.h>
//#include<string.h>
using namespace std;
int main()
{
    int N,R;
    scanf("%d %d", &N, &R);
    if(N<10){
        printf("%d", (10-N)*100+R);
    }
    else{
        printf("%d", R);
    }
    return 0;
}
//  [cpp]
#include<bits/stdc++.H>
using namespace std;
int main()
{
   int n,r;
   cin>>n>>r;
   if(n<10)
   cout<<r+100*(10-n);
   else
   {cout<<r;
   }

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

int main()
{
    int N,R,hasil;

    scanf("%d %d", &N, &R);
    if (N<10){
        hasil += R + 100 * (10 - N)
    }
    else{
        hasil= R;
    }
    printf("%d",hasil);

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

int main()
{
    int N,R,hasil;

    scanf("%d %d", &N, &R);
    if (N<10){
        hasil  100*(10-N);
        hasil - R + hasil;
    }
    else{
        hasil= R;
    }
    printf("%d",hasil);

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

int main(){
	int n, r;
	if(scanf("%d %d", &n,&r)==EOF){return 0;}
	if(n >= 10){printf("%d\n", r);}
	else{printf("%d\n", r + 100*(10 - n));}
	return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <limits.h>

int main(void) {
	int n, r;

	scanf("%d %d", &n, &r);
	if (n >= 10) printf("%d", r);
	else printf("%d", r + 100 * (10 - n));
	return 0;
}
//  [c]

#include <stdio.h>

int main() {
	int N, R;
	scanf("%d%d",&N,&R);
	if (N>=10) {
		printf("%d",R);
	}
	else {
		printf("%d",R+100*(10-N));
	}
	return 0;
}
//  [c]
#include <stdio.h>

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

int main(){
int N;
scanf ("%d",&N);
long long int A[100];
long long int B = 1;
long long int x = 1000000000000000000;
for (int i = 0; i < N; i++ ){
scanf ("%lld",&A[i]);
if (A[i]==0){
	printf ("0\n");
	return 0;
}
}

for (int i = 0; i< N; i++){
	x= x/ A[i];
	if (x==0){
		printf ("-1\n");
		return 0;
}
	else{
	B= B * A[i];
}
}
printf ("%lld",B);
return 0;
}
//  [c]
#include<stdio.h>

int main(){
int N;
scanf ("%d",&N);
long long int A[N]{};
long long int B = 1;
long long int x = 1000000000000000000;
for (int i = 0; i < N; i++ ){
scanf ("%lld",&A[i]);
if (A[i]==0){
	printf ("0\n");
	return 0;
}
}

for (int i = 0; i< N; i++){
	x= x/ A[i];
	if (x==0){
		printf ("-1\n");
		return 0;
}
	else{
	B= B * A[i];
}
}
printf ("%lld",B);
return 0;
}
//  [javascript]
"use strict";
main(
  require("fs")
    .readFileSync("/dev/stdin", "UTF-8")
    .trim()
    .split("\n")
);

function main(input) {
  input = input[0].split(" ").map(Number);

  if (input[0] >= 10) {
    console.log(input[1]);
  } else {
    console.log(input[1] + 100 * (10 - input[0]));
  }
}
//  [javascript]
(function Main(input){var input=input.split(' '),N=input[0]-0,R=input[1]-0;console.log(N>=10?R:R+100*(10-N))})(require("fs").readFileSync("/dev/stdin","utf8"));
//  [javascript]
const main = stdin => {
  const [N, R] = stdin.trim().split(' ').map(x => parseInt(x))
  if (N >= 10) {
    console.log(N)
  } else {
    console.log(R + 100 * (10 - N))
  }
}

// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
//  [javascript]
n = -1
r < -1
while n<1 || 100<n || r<0 || 4111<r
n = gets.to_i
r = gets.to_i
end
  
if n >= 10
	puts r
   else
    puts r-(10-n)
end
//  [javascript]
function main(input) {
  var args = input.split(' ');
  var n = parseInt(args[0], 10);
  var r = parseInt(args[1], 10);
  var hiddenRating;
  if ( n >= 10) {
    hiddenRating = r;
  } else {
    var argument = 100*(10 - n);
    hiddenRating = r + argument;
  }
  return hiddenRating;
}


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

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

var stdInScanner = bufio.NewScanner(os.Stdin)

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

func main() {
	stdInScanner.Split(bufio.ScanWords)

	N := nextInt()
	R := nextInt()

	if N >= 10 {
		fmt.Println(R)
	} else {
		fmt.Println(R + (100 * (10 - N)))
	}
}
//  [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)

	N, R := getInt(), getInt()
	if N >= 10 {
		out(R)
		return
	}
	out(R + 100*(10-N))
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var n, r int
	fmt.Scan(&n, &r)

	var ans int
	if n >= 10 {
		ans = r
	} else {
		ans = r + (100*(10-n))
	}

	fmt.Println(ans)
}
//  [go]
package main

import "fmt"

func main() {
	var n, r int
	fmt.Scan(&n, &r)

	if n >= 10 {
		fmt.Println(r)
	} else {
		fmt.Println(r - 100*(10-n))
	}
}
//  [go]
package main

import "fmt"

func main() {
	var n, r int
	fmt.Scan(&n, &r)

	if n >= 10 {
		fmt.Println(r)
	} else {
		fmt.Println(100 * (10 - n))
	}
}
//  [go]
package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	scanner.Split(bufio.ScanWords)

	scanner.Scan()
	N, err := strconv.Atoi(scanner.Text())
	if err != nil {
		log.Fatal(err)
	}

	scanner.Scan()
	R, err := strconv.Atoi(scanner.Text())
	if err != nil {
		log.Fatal(err)
	}

	if N >= 10 {
		fmt.Println(N)
	} else {
		fmt.Println(R + (100 * (10 - N)))
	}
}
//  [ruby]
N, R = gets.split.map(&:to_i)
p R + 100 * [10-N, 0].max
//  [ruby]
n, r = gets.split.map(&:to_i)


s = 100 * ( 10 - n)

if n >= 10
  puts r
else
  puts r + s
end
//  [ruby]
n, r = *gets.split(" ").map(&:chomp).map(&:to_i)
n > 10 ? puts(r) : puts(r + 100 * (10 - n))
//  [ruby]
n, r = gets.split.map(&:to_i)
puts r + (n>=0 ? 0 : 100*(10-n))
//  [ruby]
n,r = gets.chomp.split(" ").map(&:to_i)
if n >=10
  puts r
else
  puts (100(10-n)) + r
end
//  [ruby]
n,r = gets.chomp.split(" ").map(&:to_i)
if n >=10
  puts r
else
  puts 100(10-n) + r
end
//  [rust]
/* {{{ */
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

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

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
/* }}} */

fn main() {
    input! {
        n: u32,
        r: u32
    }
    if n < 10 {
        println!("{}", r + (100 * (10 - n)));
    } else {
        println!("{}", r);
    }
}
/* vim:set foldmethod=marker: */
//  [rust]
use std::io;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut iter = buf.split_whitespace();
	let n: i32 = match iter.next().unwrap().parse(){
		Ok(n) => n,
		Err(_) => panic!(""),
	};
	let r: i32 = match iter.next().unwrap().parse() {
		Ok(n) => n,
		Err(_) => panic!(""),
	};
	if n >= 10 {
		println!("{}", r);
	}else{
		let p = r+100*(10-n);
		println!("{}", p);
	}
}
//  [rust]
#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use std::cmp::*;
use std::collections::*;
use std::mem::*;

fn main() {
    let (r, w, e) = (std::io::stdin(), std::io::stdout(), std::io::stderr());
    let mut io = IO::new(r.lock(), w.lock(), e.lock());
    let (n, r): (usize, usize) = (io.read(), io.read());

    if n >= 10 {
        io.writeln(r);
    } else {
        // r:表示
        // x :内部
        // x - 100*(10-n) = r
        io.writeln(r + 100 * (10 - n));
    }
}

static MOD: i64 = 1000000007;
// IO
use std::io::*;
struct IO<R: Read, W: Write, E: Write> {
    Read: R,
    Write: BufWriter<W>,
    Error: BufWriter<E>,
}
impl<R: Read, W: Write, E: Write> IO<R, W, E> {
    fn new(r: R, w: W, e: E) -> IO<R, W, E> {
        IO {
            Read: r,
            Write: BufWriter::new(w),
            Error: BufWriter::new(e),
        }
    }
    fn read<T>(&mut self) -> T
    where
        T: std::str::FromStr,
    {
        let next: String = self
            .Read
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect();
        next.parse().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    fn readn<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read::<T>()).collect::<Vec<_>>()
    }
    fn readmat<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n).map(|_| self.readn(m)).collect()
    }
    fn write<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
    }
    fn writeln<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
        self.Write.write(b"\n");
    }
    fn debug<S: std::fmt::Debug>(&mut self, val: S) {
        writeln!(self.Error, "(debug) {:?}", &val);
    }
    fn debug2<S: std::fmt::Debug, T: std::fmt::Debug>(&mut self, val1: S, val2: T) {
        writeln!(self.Error, "(debug2) {:?} -> {:?}", val1, val2);
    }
    fn debug3<S: std::fmt::Debug, T: std::fmt::Debug, U: std::fmt::Debug>(
        &mut self,
        val1: S,
        val2: T,
        val3: U,
    ) {
        writeln!(
            self.Error,
            "(debug3) {:?} -> {:?} -> {:?}",
            val1, val2, val3
        );
    }
}
//  [rust]
#[macro_use]
extern crate lib;

fn main() {
    lib::input!{n: u32, r: u32}

    let rate = match n {
        1..=10 => r + 100 * (10 - n),
        _ => r,
    };

    println!("{}", rate);
}
//  [rust]
use std::io::stdin;

fn main() {
    let line = String::new();
    stdin().read_line(&mut line).unwrap();
    
    let words: Vec<i64> = line
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect();

    let n = words[0];
    let r = words[1];

    if n >= 10 {
        println!("{}", r);
    } else {
        println!("{}", r + 100 * (10 - n))
    }
}
//  [rust]
use std::io::stdin;

fn main() {
    let line = String::new();
    stdin().read_line(&mut line).unwrap();
    
    let words = line
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect()

    let n = words[0];
    let r = words[1];

    if n >= 10 {
        println!("{}", r);
    } else {
        println!("{}", r + 100 * (10 - n))
    }
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let line = readInts()
    let n = line[0]
    let r = line[1]
    
    if n >= 10 {
        print(r)
    } else {
        print(r + 100 * (10 - n))
    }
}

main()
//  [swift]
import Foundation

let split = readLine()!.componentsSeparatedByString(" ")
let N = Int(split[0])!
let R = Int(split[1])!

if (N < 10) {
  print(R + (100 * (10 - N)))
} else {
  print(R)
}
//  [swift]
import Foundation
 
let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ")
 
let N = Int(split[0])!
let R = Int(split[1])!

if (N <= 10){
    print(R+100*(10-N))
}else{
    print(R)
}
//  [swift]
import Foundation
 
let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: " ")
 
let N = Int(split[0])!
let R = Int(split[1])!

if (N >= 10){
    print(R+100*(10-N))
}else{
    print(R)
}
//  [typescript]
import * as fs from 'fs';

//in
// 2 2919
//out
// 3719
const main = (inp: string) => {
    // 100 * (10-k)
    const [n, r]: number[] = inp.split(' ').map(Number);
    if (r === 0) {
        console.log(0);
    } else if (n >= 10) {
        console.log(r);
    } else {
        console.log(r + (100 * (10 - n)));
    }
};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());
//  [typescript]
    function Main(inputString) {
    	// 1行目がinput[0], 2行目がinput[1], …に入る
    	let inputArray = inputString.split(" ");
    	//文字列から10進数に変換するときはparseIntを使います
    	let executeCount = parseInt(inputArray[0], 10);
    	let displayRating = parseInt(inputArray[1], 10);
        let innerRating = 0;

        // 10回未満なら表示レーティング+100*(1-参加回数)
        // 10回以上なら表示レーティング

        if(executeCount >= 10){
            innerRating = displayRating;
        } else {
            innerRating = displayRating + (100 * ( 10 - executeCount ));
        }


    	//出力
    	console.log('%d', innerRating);
    }
 Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
class NormalInput {
  input: string[];
  pointer: number;
  constructor(raw: string) {
    this.input = raw.split(/ |\n/);
    this.pointer = 0;
  }
  int = (): number => {
    const ret = parseInt(this.input[this.pointer], 10);
    this.pointer++;
    return ret;
  };
  str = (): string => {
    const ret = this.input[this.pointer];
    this.pointer++;
    return ret;
  };
  strs = (length: number): string[] => {
    let ret: string[] = [];
    for (let i = 0; i < length; i++) {
      ret.push(this.str());
    }
    return ret;
  };
  ints = (length: number): number[] => {
    let ret: number[] = [];
    for (let i = 0; i < length; i++) {
      ret.push(this.int());
    }
    return ret;
  };
}

function Main({ int, str, strs, ints }: NormalInput) {
  const N = int();
  const R = int();
  console.log(N>=10?R:R+100*(10-N));
}

//DO NOT EDIT
Main(new NormalInput(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
class AtCoder {
  // 入力系
  input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);
  input_i=-1;

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

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

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

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

  // 自作
  gcd(...arr:number[]):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=x;
    }
    return arr[arr.length-1];
  };
  lcm(...arr:number[]):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=arr[i]*arr[i+1]/x;
    }
    return arr[arr.length-1];
  };
  isPrime(n:number):boolean{
    if(n < 2) return false;
    const suq=Math.sqrt(n);
    for(let i=2;i<=suq;i++){
      if(n%i==0){
        return false;
      }
    }return true;
  };
  deduplicate(a:any[]):any[]{
    return Array.from(new Set(a));
  };
  f(roop:number, callback:any){
    for(let i=0;i<roop;i++){
      callback(i);
    }
  };
  Yes(){
    console.log('Yes');
  }
  No(){
    console.log('No');
  }
  YES(){
    console.log('YES');
  }
  NO(){
    console.log('NO');
  }
}
const m = () => {
  const o = new AtCoder();
  let [n, r] = o.nn(2);
  if(n>=10){
    o.o(r);
  }else{
    o.o(r-100*(10-n));
  }
}
m();
//  [typescript]
// 内部レーティングの求め方
// 参加回数10回未満なら表示レーティング+100*(1-参加回数)

// 参加回数10回以上なら表示レーティングと等しい


    // inputに入力データ全体が入る
    // 実行回数 内部レーティング
    function Main(inputString) {
    	// 1行目がinput[0], 2行目がinput[1], …に入る
    	let inputArray = inputString.split(" ");
    	//文字列から10進数に変換するときはparseIntを使います
    	let executeCount = parseInt(inputArray[0], 10);
    	let displayRating = parseInt(inputArray[1], 10);
        let innerRating = 0;

        // 10回未満なら表示レーティング+100*(1-参加回数)
        // 10回以上なら表示レーティング

        if(executeCount >= 10){
            innerRating = displayRating;
        } else {
            innerRating = displayRating + (100 * executeCount);
        }


    	//出力
    	console.log('%d', innerRating);
    }
        //*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
       Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]
print(7-["SUN","MON","TUE","WED","THU","FRI","SAT"].index(input()))
//  [python]
a = input()

dow = {
  "SUN":7,
  "MON":6,
  "TUE":5,
  "WED":4,
  "THU":3,
  "FRI":2,
  "SAT":1
}
print(dow[a])
//  [python]
s = input()
w = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3,
      'FRI':2, 'SAT':1}
print(w[s])
//  [python]
s = input()

if s == 'SAT':
    print(1)
if s == 'FRY':
    print(2)
if s == 'THU':
    print(3)
if s == 'WED':
    print(4)
if s == 'TUE':
    print(5)
if s == 'MON':
    print(6)
if s == 'SUN':
    print(7)
//  [python]
S=input()
if S=="SUN":
    print("MON")
elif S=="MON":
    print("TUE")
elif S=="TUE":
    print("WED")
elif S=="WED":
    print("THU")
elif S=="THU":
    print("FRI")
elif S=="FRI":
    print("SAT")
elif S=="SAT":
    print("SUN")
//  [python]
S = input()
week = ["SUN","MON", "TUE", "WED", "THU", "FRI", "SAT"]
for i in week:
  if week[i] == S:
    print(7 - i)
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
public class Main {
    public static void main(String[] args) {
      String str = "";  
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        
        try {
            str = reader.readLine();
            reader.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
      switch (str) {
       case "SUN":
           System.out.println("7");
          break;
       case "MON":
           System.out.println("6");
          break;
       case "TUE":
           System.out.println("5");
          break;
       case "WED":
           System.out.println("4");
          break;
       case "THU":
           System.out.println("3");
          break;
       case "FRI":
           System.out.println("2");
          break;
       case "SAT":
           System.out.println("1");
          break;
        default:
          break;
     }
}
}