jiahuimbzuai/CoQuIR huggingface dataset:
//  [javascript]
"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function () { return this.index < this.max },
        "next": function () { if (!this.hasNext()) { throw "ArrayIndexOutOfBoundsException"; } else { return this.list[this.index++]; } }
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    let arr = next().split("")
    let ans = 0
    while (true) {
        let tmp = arr.length
        for (let i = 0; i < arr.length-1; i++) {
            if (arr[i] == '0' && arr[i+1] == '1') {
                arr.splice(i, 2)
                ans += 2
                break
            } else if (arr[i] == '1' && arr[i+1] == '0') {
                arr.splice(i, 2)
                ans += 2
                break
            }
        }
        if(tmp == arr.length){
            console.log(ans)
            return
        }
    }
}
Main()
//  [javascript]
s = input()

aux = 0
stop = True
while stop:
    if '01' in s:
        s = s.replace('01', '', 1)
        aux += 2
    elif '10' in s:
        s = s.replace('10', '', 1)
        aux += 2
    else:
        stop = False

print(aux)
//  [go]
package main

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

func min(nums []int) int {
	ret := nums[0]
	for _, v := range nums {
		if v < ret {
			ret = v
		}
	}
	return ret
}

func main() {
	sc.Split(bufio.ScanWords)
	s := nextMega()
	cnt := make([]int, 2)
	for i := range s {
		cnt[s[i]-'0']++
	}
	puts(min(cnt) * 2)
	wt.Flush()
}

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

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

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

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

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

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

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

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

func puts(a ...interface{}) {
	fmt.Fprintln(wt, a...)
}
//  [go]
package main

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

var (
	MaxBuffLen  = 100000 + 1024
	InitBuffLen = 1024
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]byte, 1024), MaxBuffLen)
	scanner.Scan()
	buff := scanner.Bytes()

	r := 0
	for _, b := range buff {
		if b == '0' {
			r++
		}
	}
	fmt.Println(2 * min(r, len(buff)-r))
}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func main() {
	var S string
	var zero, one float64
	var r float64
	s := bufio.NewScanner(os.Stdin)
	b := make([]byte, 1000000)
	s.Buffer(b, 1000000)
	s.Scan()
	S = s.Text()
	for _, v := range S {
		if v == '0' {
			zero++
		} else {
			one++
		}

	}
	r = math.Min(zero, one) * 2
	fmt.Println(r)
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextString() string {
	var s string
	if sc.Scan() {
		s = sc.Text()
	}
	return s
}

func main() {
	sc.Split(bufio.ScanWords)
	s := nextString()
	var cubes = map[string]int{}
	for _, r := range s {
		cube := string([]rune{r})
		cubes[cube]++
	}
	if cubes["0"] < cubes["1"] {
		fmt.Println(2 * cubes["0"])
	} else if cubes["1"] < cubes["0"] {
		fmt.Println(2 * cubes["1"])
	} else {
		fmt.Println(2 * cubes["0"])
	}
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextString() string {
	var s string
	if sc.Scan() {
		s = sc.Text()
	}
	return s
}

func isSingelColor(nokori string) bool {
	return strings.Count("1", nokori) == 0 || strings.Count("1", nokori) == 1
}

func search(s string) int {
	var count int
	var stack []string
	for _, r := range s {
		cube := string([]rune{r})
		if len(stack) == 0 {
			stack = append(stack, cube)
		} else if stack[len(stack)-1] != cube {
			count += 2
			stack = stack[:len(stack)-1]
		} else {
			stack = append(stack, cube)
		}
	}
	nokori := strings.Join(stack, "")
	if len(nokori) == 0 || isSingelColor(nokori) {
		return count
	} else {
		return count + search(nokori)
	}
}

func main() {
	sc.Split(bufio.ScanWords)
	s := nextString()
	fmt.Println(search(s))
}
//  [ruby]
s = gets.chomp
red = s.count("0")
blue = s.length - red
puts [red, blue].min * 2
//  [ruby]
s = gets.chomp
z = s.count('0')
o = s.count('1')
puts [z,o].min * 2
//  [ruby]
s = gets.chomp
r = s.count("0")
b = s.count("1")

puts (r <= b ? r : b) * 2
//  [ruby]
s=gets.chomp

n=s.length
count=0
(n/2).times do |i|
    check=false
    (s.length-1).times do |j|
        if s[j]!=s[j+1]
            s.slice!(j,2)
            count+=2
            check=true
            break
        end
    end
    unless check
        break
    end
end
puts count
//  [ruby]
S = gets.chomp

length = S.length
s = S
while !s.index("01").nil?
  s.gsub!(/01/, '')
end
while !s.index("10").nil?
  s.gsub!(/10/, '')
end

p length - s.length
//  [ruby]
s = gets.chomp.split("")
i = 1
count = 0
ookisa = s.size
#p s
while true
    if ookisa == 1
        break
    end
    if s[i] != s[i-1]
        s[i] = " "
        s[i-1] = " "
        count += 2
        s.delete(" ")
    else
        i += 1
        if i > s.size - 1
            break
        end

        if s[i] == nil
            break
        end
    end
end
puts count
//  [rust]
//! ----------------------------------------------
//! Framework <https://github.com/vain0x/procon>
//!
//! See the bottom of file for solution.
//! ----------------------------------------------

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

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

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

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

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

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

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

fn main() {
    let S = rl();

    let mut red = 0;
    let mut blue = 0;
    for c in S.chars() {
        if c == '0' {
            red += 1;
        } else {
            blue += 1;
        }
    }

    println!("{}", min(red, blue) * 2);
}
//  [rust]
use std::io;
use std::str::FromStr;

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

fn main() {
    let s = input_char_vec();
    let mut red = 0i32;
    let mut blue = 0i32;
    for c in &s {
        if *c == '0' {
            red += 1;
        } else {
            blue += 1;
        }
    }
    println!("{}", s.len() as i32 - (red - blue).abs());
}
//  [rust]
use std::io::*;

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let s: Vec<char> = itr.next().unwrap().chars().collect();

    let mut one = 0;
    let mut zero = 0;
    for &c in s.iter() {
        if c == '0' {
            zero += 1;
        } else {
            one += 1;
        }
    }
    println!("{}", std::cmp::min(zero, one) * 2);
}
//  [rust]
use proconio::{fastout, input, marker::Chars};

#[fastout]
fn main() {
    input! {
        s: Chars
    };

    let mut s: Vec<char> = s;
    let mut count = 0;
    let mut flag = true;

    if s.len() >= 2 {
        while flag {
            let mut prev = s[0];
            let mut prev_i = 0;
            for i in 1..s.len() {
                if s[i] == '2' {
                    flag = false;
                    continue;
                }
                if s[i] != prev && prev != '2' {
                    s[i] = '2';
                    s[prev_i] = '2';
                    count += 2;
                    flag = true;
                } else {
                    prev = s[i];
                    prev_i = i;
                    flag = false;
                }
            }
        }
    }

    println!("{}", count);
}
//  [rust]
use proconio::{fastout, input, marker::Chars};

#[fastout]
fn main() {
    input! {
        s: Chars
    };

    let mut s: Vec<char> = s;
    let mut count = 0;
    let mut flag = true;

    if s.len() >= 2 {
        while flag {
            let mut prev = s[0];
            let mut prev_i = 0;
            for i in 1..s.len() {
                if s[i] == '2' {
                    flag = false;
                    continue;
                }
                if s[i] != prev && s[i] != '2' && prev != '2' {
                    s[i] = '2';
                    s[prev_i] = '2';
                    count += 2;
                    flag = true;
                } else {
                    prev = s[i];
                    prev_i = i;
                    flag = false;
                }
            }
        }
    }

    println!("{}", count);
}
//  [rust]
use proconio::{fastout, input, marker::Chars};

#[fastout]
fn main() {
    input! {
        s: Chars
    };

    let mut s: Vec<char> = s;
    let mut count = 0;

    while s.iter().filter(|x| **x == '1').count() >= 1
        && s.iter().filter(|x| **x == '0').count() >= 1
    {
        let mut prev = s[0];
        let mut prev_i = 0;
        for i in 1..s.len() {
            if s[i] == '2' {
                continue;
            }
            if s[i] != prev && s[i] != '2' && prev != '2' {
                s[i] = '2';
                s[prev_i] = '2';
                count += 2;
                break;
            } else {
                prev = s[i];
                prev_i = i;
            }
        }
    }

    println!("{}", count);
}
//  [swift]
// 🐋💭
import Foundation

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

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

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

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

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

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

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

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

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

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

func main() {
    var s = readLine()!.map { String($0) }
    let zeroCount = s.filter { $0 == "0"}.count
    print(2 * min(zeroCount, s.count - zeroCount))
}
main()
//  [swift]
var r=0,b=0;readLine()!.characters.forEach{$0>"0" ?b++:r++};print(min(r,b)*2)
//  [swift]
let S=readLine()!.characters;print(S.count-abs(S.reduce(0){$0+($1>"0" ?1:-1)}))
//  [swift]
import Foundation

var S = readLine()!
let SLength = S.characters.count

while S.containsString("0") && S.containsString("1") {
    if let r = S.rangeOfString("01") {
        S.removeRange(r)
    } else {
        S.removeRange(S.rangeOfString("10")!)
    }
}
print(SLength - S.characters.count)
//  [swift]
import Foundation

var S = readLine()!
let SL = S.characters.count

while true {
    if let range = S.rangeOfString("10") {
        S.removeRange(range)
    } else if let range = S.rangeOfString("01") {
        S.removeRange(range)
    } else {
        break
    }
}
print(SL-S.characters.count)
//  [swift]
import Foundation

var S = readLine()!
let SLength = S.characters.count

while S.containsString("10") || S.containsString("01") {
    S = S.stringByReplacingOccurrencesOfString("10", withString: "")
  	S = S.stringByReplacingOccurrencesOfString("01", withString: "")
}

print(SLength - S.characters.count)
//  [typescript]
function main(input) {
  const s = input.trim();
  let cnt = 0;
  for (let i = 0; i < s.length; i++) {
    const char = s[i];
    if (char === "0") cnt++;
  }
  const min = Math.min(cnt, s.length - cnt);
  const result = 2*min;
  console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
"use strict"
let fs = require('fs');
let input = fs.readFileSync("/dev/stdin", "utf8").split(/\s/);

const myMin = (a: number, b: number) => a < b ? a : b;

let red = 0, blue = 0;

for(let i=0; i<input[0].length; i++) {
  input[0][i] === '0' ? red++ : blue++;
}

console.log( 2 * myMin(red, blue) );
//  [typescript]
"use strict"
let fs = require('fs');
let input = fs.readFileSync("/dev/stdin", "utf8").split(/\s/);

const myMin = (a: number, b: number) => a < b ? a : b;
let blocks = input[0];
let red = 0, blue = 0;

for(let i=0; i<blocks.length; i++) {
  blocks[i] === '0' ? red++ : blue++;
}

console.log( 2 * myMin(red, blue) );
//  [typescript]
function main(input) {
  ('use strict');
  const args = input.split('').map((v) => Number(v));
  var result = remove({ arr: args, removeCount: 0 });
  console.log(result.removeCount);
}

function remove(obj) {
  for (var i = 0; i < obj.arr.length; i++) {
    if (obj.arr[i] + obj.arr[i + 1] === 1) {
      obj.arr.splice(i, 2);
      obj.removeCount += 2;
      remove(obj);
      break;
    }
  }
  return obj;
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
function main(input) {
  ('use strict');
  const args = input.split('').map((v) => Number(v));
  var result = remove({ arr: args, removeCount: 0 });
  console.log(result.removeCount);
}

function remove(obj) {
  for (var i = 0; i < obj.arr.length; i++) {
    if (obj.arr[i] + obj.arr[i + 1] === 1) {
      obj.arr.splice(i, 2);
      obj.removeCount += 2;
      remove(obj);
    }
  }
  return obj;
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
function main(input) {
  ('use strict');
  const args = input.split('').map((v) => Number(v));
  var result = remove({ arr: args, removeCount: 0 });
  console.log(result.removeCount);
}

function remove(obj) {
  for (var i = 0; i < obj.arr.length; i++) {
    if (obj.arr[i] + obj.arr[i + 1] === 1) {
      obj.arr.splice(i, 2);
      obj.removeCount += 2;
      return remove(obj);
    }
  }
  return obj;
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
t, x = map(int, input().split())
print(t/x)
//  [python]
T, X = [int(_) for _ in input().split()]
print(T / X)
//  [python]
a, b = [int(i) for i in input().split()]

print(a/b)
//  [python]
x,y =map(int,input().split())
print(x/t)
//  [python]
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    t, x = Input()
    print(t/x)
//  [python]
N = int(input())
L = list(map(int,input().split()))

if max(L) < (sum(L) - max(L)):
    print('Yes')
else:
    print('No')
//  [java]
import java.io.*;
import java.util.*;
public class Main {
	
	public static void main(String[] args) {
	
		MyScanner sc = new MyScanner();
		double a=sc.nextDouble();
		int b=sc.nextInt();
				
		System.out.println(a/b);
	}
	
	public static PrintWriter out;

	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

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

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

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

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

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

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

	}
	

}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {

		FastScanner sc = new FastScanner();
		double T = sc.nextInt();
		double X = sc.nextInt();
		System.out.println(T / X);
	}
	//以下、自作ライブラリ

	//最大公約数
	public static long gcd(long a, long b) {
		if (a < b)
			return gcd(b, a);
		long c = 0;
		c = a % b;
		if (c == 0)
			return b;
		return gcd(b, c);
	}

	//最小公倍数
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}

	//素数判定
	public static boolean isPrime(int n) {
		if (n < 2)
			return false;
		if (n == 2)
			return true;
		if (n % 2 == 0)
			return false;

		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}
}

//以下、高速スキャナークラス
class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}
//  [java]
import java.util.Scanner;
class Main{
public static void main(String args[]){
	Scanner s=new Scanner(System.in);
	int sumOfLeft=0;
	int max=0;
	int side=0;
	int N=s.nextInt();
	for(int i=0;i<N;i++){
		side=s.nextInt();
		sumOfLeft+=side;
		if(max<side) max=side;
	}
	if(sumOfLeft<=(2*max)) System.out.println("No");
	else System.out.println("Yes");
	}
}
//  [java]
import java.util.Scanner;
class Main{
public static void main(String args[]){
	Scanner s=new Scanner(System.in);
	int sumOfLeft=0;
	int max=0;
	int side=0;
	int N=s.nextInt();
	for(int i=0;i<N;i++){
		side=s.nextInt();
		sumOfLeft+=side;
		if(max<side) max=side;
	}
	if(sumOfLeft<=(2*max)) System.out.println("No");
	else System.out.println("Yes");
}}
//  [java]
import java.util.Scanner;
 class Main{
	public static void main(String args[]){
		Scanner s=new Scanner(System.in);

	        int sumOfLeft=0;
        	int max=0;
	        int side=0;
		int N=s.nextInt();
        	 for(int i=0;i<N;i++){
	         	side=s.nextInt();
			sumOfLeft+=side;
        		if(max<side) max=side;
        	 }
	         if(sumOfLeft>=2*max) System.out.println("No");
        	 else System.out.println("Yes");
     }
 }
//  [cpp]
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define LL long long
#define endl '\n'
using namespace std;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    double t, x;
    cin >> t >> x;
    printf("%lf\n", t / x);
    return 0;
}
//  [cpp]
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <string>
#include <cstring>
#include <functional>
#include <climits>
#define ll long long
#define P(a) cout << a << " ";
#define NCONS 200001
#define endl '\n'
using namespace std;

int main(void)
{
	cin.tie(NULL); ios_base::sync_with_stdio(false);
	double T, X; cin >> T >> X;
	cout << T / X << endl;

	return 0;
}
//  [cpp]
// warm heart, wagging tail,and a smile just for you!
//                                                                     ███████████   
//                                                                   ███╬╬╬╬╬╬╬╬╬╬███
//                                                                ███╬╬╬╬╬████╬╬╬╬╬╬███
//                                            ███████████       ██╬╬╬╬╬████╬╬████╬╬╬╬╬██
//                                      █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██
//                               ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██
//                             ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██
//                           ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████
//                         ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██
//                       ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███
//                     ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██
//                 ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████
//     █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████
//   ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████
//   ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██
//       ██████████████  ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████
//                         ███████                           █████  ███████████████████  
#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
#define INF 1LL<<60
#define fs first
#define sc second
#define pb push_back
#define int long long
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i = (b-1);i>=a;i--)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr,mp) for(auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x)  cout << #x << " = " << (x) << endl;
#define SP << " " << 
typedef pair<int,int> P;
typedef vector<vector<P> > Graph;

signed main(){
  ios::sync_with_stdio(false);
  cin.tie(0);  
  //問題文を読む時間をケチらない！！

  double a,b;
  cin >> a >> b;

  cout << fixed << a/b << endl;

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



int main() {
    double t, x;
    double ans = t/x;
    printf("%.10f\n", ans);
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
  double a,b;
  cin>>a,b;
  cout<<fixed<<setprecision(5);
  cout<<a/b<<endl;
  return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main()
{
 int t,x;
 cin>>t>>x;
 double ans=double(t)/x;
 cout<<fixed<<setprecision<<ans<<endl;

 return 0;
}
//  [c]
#include <stdio.h>
int main(void){
    int X,T;
    double ans;
    scanf("%d %d\n", &T, &X);
    ans = T / (double)X;
    printf("%.10f",ans);
    
    return 0;
}
//  [c]
#include<stdio.h>
double t,x;
int main(void){
    scanf("%d%d",&t,&x);
    printf("%f",t/x);
    return 0;
}
//  [c]
#include <stdio.h>

int main()
{
    double X;
    double T;
    double t;

    scanf("%ld %ld\n",&T,&X);

    t=T/X;

    printf("%lf\n",t);

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

  printf("%f",a/b);
  
return 0;
}
//  [c]
#include<stdio.h>
int main(void)
{   
    int N,L[10];
    int i,j,tmp,S=0;
  
    scanf("%d",&N);
    
    for(i=0;i<N;i++)
      scanf("%d",&L[i]);
  
    for(i=0;i<N;i++){
      for(j=i+1;j<N;j++){
        if(L[i]>L[j]){
          tmp=L[i];
          L[i]=L[j];
          L[j]=tmp;
        }
      }
    }
  
    for(i=0;i<N-1;i++)
      S+=L[i];
    
    if(S>L[N-1]) printf("Yes\n");
    else printf("No\n");
  
    return 0;
}
//  [javascript]
function Main(input) {
    var strs = input.split(" ");
    var T = Number(strs[0]);
    var X = Number(strs[1]);
    console.log((T/X).toPrecision(10));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input){
    tx=input.split(' ')
    t=parseInt(tx[0],10)
    x=parseInt(tx[1],10)
    console.log(t/x)

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
  var t = input.split(" ")[0];
  var x = input.split(" ")[1];
  console.log("%d",t/x)
}

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

 class atcoder{
     public static void main(String args[]){
         Random r = new Random();
         int N=r.nextInt(8)+3;
         System.out.println(N+"角形");
         int[] L=new int[N];
         System.out.println("辺の長さは");
         for(int i=0;i<N;i++){
             L[i]=r.nextInt(100)+1;
             System.out.print(L[i]+",");
         }

	System.out.println();

        int sumOfLeft=0;
        int max=0;
        int side=0;
         for(int i=0;i<L.length;i++){
             side=L[i];
             if(max<side){
                 sumOfLeft+=max;
                 max=side;
             }
             else{
                 sumOfLeft+=side;
             }
         }
	System.out.println("最大の辺："+max+"その他の総和："+sumOfLeft);
         if(sumOfLeft>max) System.out.println("この多角形は開いている可能性があります");
         else System.out.println("この多角形は閉じています");

     }
 }
//  [javascript]
function Main(input) {
  const array = input.trim().split(' ')
  const T = parseInt(array[0])
  const X = parseInt(array[1])

  var ans = T / 3
  console.log(ans)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
var T,X;
prompt(T,X);
alert(T/X);
//  [go]
package main

import "fmt"

func main() {
	var T, X float64
	fmt.Scan(&T, &X)

	fmt.Println(T / X)

}
//  [go]
package main

import "fmt"

func main()  {
	var T,X float64
	fmt.Scan(&T,&X)
	fmt.Println(T/X)
}
//  [go]
package main

import (
    "fmt"
)

func main() {
	var t, x float64
	fmt.Scan(&t, &x)
	ans := t/x 
	fmt.Printf("%.10f\n", ans)
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	ls := make([]int, n)
	for i := range ls {
		fmt.Scan(&ls[i])
	}
	sum := 0
	max := 0
	for _, v := range ls {
		sum += v
		if v > max {
			max = v
		}
	}

	if sum-max > max {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [ruby]
t,x=gets.split.map(&:to_f);p t / x
//  [ruby]
a, b = gets.split.map(&:to_i)

puts a/b.to_f
//  [ruby]
def get_i() #空白区切の入力を数値(整数)の配列で返す
  return gets.chomp.split(" ").map(&:to_i)
end
def get_f() #空白区切の入力を数値(実数)の配列で返す
  return gets.chomp.split(" ").map(&:to_f)
end
def get() #空白区切の入力を文字列の配列で返す
  return gets.chomp.split(" ")
end
def get_nsp() #入力されたものを一文字ずつに区切った文字列の配列で返す
  return gets.chomp.split("")
end
def yn_judge(bool,y="Yes",n="No") #boolに真偽を投げることで、trueならy、falseならnの値を出力する
  return bool ? y : n 
end
def array(size1,init=nil,size2=-1) #size2に二次元配列時の最初の要素数、size1に次の配列の大きさ、initに初期値を投げることでその配列を返す
  if size2==-1
    return Array.new(size1){init}
  else
    return Array.new(size2){Array.new(size1){init}}
  end
end

T,X=get_f
puts T/X
//  [ruby]
t,x = gets.split.map(&:to_i)
puts (t/x)
//  [ruby]
t.x = gets.strip.split.map(&:to_i)
puts t.to_f/x
//  [ruby]
t, x = gets.split.map(&:to_i)

puts sprintf("%.12f", t / x)
//  [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<f64> = procon_read();
	let t = v[0];
	let x = v[1];
	println!("{}", t/x);
}
//  [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 x: f64 = read();
    let n: f64 = read();
    println!("{}", x / n);
}
//  [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("faild to read char") as char)
        .take_while(|c| !c.is_whitespace())
        .collect();
    token
        .parse()
        .ok()
        .expect("faild to parse token")
}

fn main(){
    let t: f64 = read();
    let x: f64 = read();

    println!("{:.8}", t / x);
}
//  [rust]
use std::io::stdin;

fn main () {
    let mut tx = String::new();
    stdin().read_line(&mut tx).unwrap();
    let tx: Vec<isize> = tx.trim().split_whitespace().flat_map(str::parse).collect();
    let t = tx[0] * 10000;
    let x = tx[1];
    println!("{}.{}", t / x / 10000, (t / x) % 10000);
}
//  [rust]
fn main() {
    let s = {
        let mut s = String::new();
        std::io::stdin().read_line(&mut s).unwrap();
        s.trim_end().to_owned()
    };

    let (t, x) = {
        let mut ws = s.split_whitespace();
        let t: i32 = ws.next().unwrap().parse().unwrap();
        let x: i32 = ws.next().unwrap().parse().unwrap();
        (t, x)
    };

    let t_f: f64 = t as f64;
    let x_f: f64 = x as f64;


    println!("{}", t_f / x_f);
}
//  [swift]
let TX: [Double] = readLine()!.split(separator: " ").map { Double($0)! }
let res: Double = TX[0] / TX[1]
print(res)
//  [swift]
let input = readLine()!.split(separator: " ").map { Double($0)! }
let T = input[0]
let X = input[1]

print(T / X)
//  [swift]
import Foundation

let input = readLine()!.componentsSeparatedByString(" ")
let T = Int(input[0])!
let X = Int(input[1])!

let ans = Float(T) / Float(X)

print(ans)
//  [swift]
import Foundation
let input = readLine()!.componentsSeparatedByString(" ")
print(Int(i[0])!*Int(i[1])!/2)
//  [swift]
import Foundation

let N = Int(readLine()!)
var input = readLine()!.components(separatedBy: " ").map { Int($0)! }

input.sortInPlace(by: {$0 > $1})

var sum = 0
for i in input {
    sum += i
}

if input[0] < sum - input[0] {
    print("Yes\n")
} else {
    print("No\n")
}
//  [swift]
import Foundation

let N = Int(readLine()!)
var input = readLine()!.componentsSeparatedByString(" ").map { Int($0)! }

input.sort()

var sum = 0
for i in input {
    sum += i
}

if input[0] < sum - input[0] {
    print("Yes\n")
} else {
    print("No\n")
}
//  [typescript]
((input: string): void => {
    const hoge: number[] = input.split(" ").map(Number);
    console.log((hoge[0] / hoge[1]).toFixed(10));
})(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
export class Main {
  static main(input: string): string {
    const [t, x] = input.split("\n")[0].split(" ").map(Number);
    return `${t/x}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
let solve = (input) => {
  const [t, x] = input.split(" ").map(Number)
  const a = Math.round((t / x) * 10 ** 10) / 10 ** 10
  return a
}
const input = require("fs").readFileSync("/dev/stdin", "utf8")
console.log(solve(input.trim()))
//  [typescript]
let solve = (input) => {
  const [t, x] = input.split(" ").map(Number)
  const a = Math.round((t / x) * 10 ** 10) / 10 ** 10
  console.log(a)
  return
}
const input = require("fs").readFileSync("/dev/stdin", "utf8")
console.log(solve(input.trim()))
//  [typescript]
function Main(input: string):void {
  const [T, X] = input.split();
  const ans = T / X;
  console.log(ans);
}

import * as fs from 'fs';
Main(fs.readFileSync('/dev/stdin', 'utf8'));
//  [python]
L,R=map(int,input().split())
M=2019
l,r,a=L%M,R%M,M
if l<r and R-L<672:
  for i in range(l,r):
    for j in range(i+1,r+1):
      a=min(a,i*j%M)
      if a<2: break
    if a<2: break
else: a=0
print(a)
//  [python]
L,R = map(int,input().split())
if R - L >= 672:
  print(0)
else:
  l = L%2019
  r = R%2019
  if l > r:
    print(0)
  else:
    a = 2018
    for i in range(l,r):
      for j in range(i+1,r+1):
        a = min((i*j)%2019,a)
        if a == 1:
          print(a)
          exit()
    print(a)
//  [python]
a,b=input().split()
a=int(a)
b=int(b)
c=0
for i in range(a,b+1):
  if b-a>=672:
    c=1
    break
  elif i%673==0:
    c=1
    break
ll=[]
if b-a==1:
  print(a*b%2019)
elif c==1:
  print(0)
elif b-a>=100:
  print(1)
elif b-a>=46:
  print(2)
else:
  for i in range(a,b):
    for j in  range(i+1,b+1):
      ll.append(i*j%2019)
  print(min(ll))
//  [python]
l,r=map(int,input().split())
mod=2019
a=l%mod
b=l//mod
c=r%mod
d=r//mod
if d-b!=0:
  print(0)
else:
  ans=float('inf')
  for i in range(a,c):
    for j in range(i+1,c+1):
      ans=min(ans,i*j)
  print(ans)
//  [python]
l,r=map(int,input().split())
mod=2019
a=l%mod
b=l//mod
c=r%mod
d=r//mod
if b==d:
  print(a*(a+1))
elif d-b==1:
  print(0)
elif d-b>1:
  print(0)
//  [python]
l,r=map(int,input().split())
mod=2019
a=l%mod
b=l//mod
c=r%mod
d=r//mod
if b==d:
  print(a*(a+1))
elif d-b==1:
  print(a)
elif d-b>1:
  print(1)
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            String str = br.readLine();
            String input[] = str.split(" ");
            int L = Integer.valueOf(input[0]);
            int R = Integer.valueOf(input[1]);
            
            int result = 2018;

          if(R-L >2019){
            R = L+2019;
          }
          if(L > 2019 && L/2019 == R/2019){
            L %= 2019;
            R %= 2019;
          }

            for(int i = L; i<R; i++) {
				if(i%2019 == 0 || result == 0){
                  result = 0;
                  break;
                }
              for(int j = i+1; j<=R; j++) {
                  int N = i* j;
                    if( N % 2019 < result && N % 2019 > 0 ) {
                        result = N % 2019;
                    } else if(N%2019 == 0){
                      result = N % 2019;
                      break;
                    }
                }
            }
            System.out.println(result);
            
            
        }catch(IOException e) {
            
        }
    }

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

public class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String in[] = new String[2];
		long l = 0, r = 0;
		try {
			line = br.readLine();
			in = line.split(" ");
			l = Long.parseLong(in[0]);
			r = Long.parseLong(in[1]);
		} catch (IOException e) {
			e.getStackTrace();
		}
		
		int min = 2020;
		int mod;
		for (long i = l; i < r; i++) {
			for (long j = i+1; j <= r; j++) {
				if(min > (mod =(int) ((i*j) % 2019))) {
					min = mod;
					if(min == 0) break;
				}
			}
			if(min == 0) break;
		}
	System.out.println(min);		
	}
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        long L = sc.nextLong();
        long R = sc.nextLong();

        
        long res;
    
        long bai = L/2019;

        if(L%2019==0 || 2019*(bai+1)<=R){
            res = 0;
        }else{
            long l=L-2019*bai;
            long r=R-2019*bai;
            res = l*(l+1);
        }
        System.out.println(res);
        
        }
    }
//  [java]
import java.util.*;

public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int l = sc.nextInt();
        int r = sc.nextInt();
        int min = 2019;
        for (int i=l; i<r; i++) {
            for (int j=i+1; j<=r; j++) {
                if (i * j % 2019 < min) {
                    min = i * j % 2019;
                }
                if (min == 0) break;
            }
            if (min == 0) break;
        }
        System.out.print(min);
    }
}
//  [java]

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = 2019;
		int l = sc.nextInt();
		int r = sc.nextInt();
		
		int lm = l % m;
		int rm = r % m;
		int ld = l / m;
		int rd = r / m;		
		int minl = Integer.MAX_VALUE;
		
		boolean isLap = rd -ld > 0;
		if( lm == 0 || rm==0 || isLap ) {
			minl = 0;
		}else {
			for( int i=lm ; i<= rm ; i++ ) {
				for( int j=lm+1 ; j<= rm ; j++ ) {
					int tmp=(i*j)%m;
					if(  minl > tmp ) {
						minl = tmp;
					}
				}
			}
		}
		
		System.out.println(minl);
	}
}
//  [cpp]
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<numeric>

#define rep(i,a,n) for(int (i)=(a);(i)<(n);(i)++)
#define rrep(i,a,n) for(int (i)=(a);(i)>=(n);(i)--)
#define INF 1000000000
#define MOD 1000000007
typedef  long long ll;
using namespace std;

ll conv(ll n,ll r){
    if(r == 0 || n==r){
        return 1;
    }
    return conv(n-1,r)+conv(n-1,r-1);
}

int a[15][29];

void solve(void){
    ll l,r;
    cin >> l >> r;
    ll la = l%2019;
    ll ra = r%2019;
    bool flag = false;
    ll l3 = l/3,r3 = r/3;
    ll l673 = l/673,r673 = r/673;
    if( r3-l3 > 0 && r673-l673>0) flag = true;
    ll ans = 1000000;
    ll tmp;
    if(flag){
        cout << 0 << endl;
    }else{
        for(int i = la;i < ra;i++){
            for(int j = i+1;j < ra+1;j++){
                tmp = i*j%2019;
                ans = min(ans,tmp);
            }
        }
        cout << ans << endl;
    }

}


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    solve();
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int A,B,m=INT_MAX;
    cin>>A>>B;
    vector<long long int>v,v1;
    if((B-A)>=672){
        cout<<0<<endl;
    }else{
        
   for(long long int i=A;i<=B;i++ ){
       for(long long int j=i+1;j<=B;j++){
            m=min(m,(i*j)%2019);    
       }
   }
   cout<<m%2019<<endl;
   }
   
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(void) {
    ll L, R;
    cin >> L >> R;

    ll ans = 2018;
    for(ll i=L;i<=R;i++) {
        for(ll j=i+1;j<=R;j++) {
            ans = min(ans, (i*j)%2019);
            if(ans==0) {
                cout << ans << endl;
                return 0;
            }
        }
    }

    cout << ans << endl;

    return (0);
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
#define BE(x) x.begin(), x.end()

int main() {
    long long l, r;
    cin >> l >> r;

    long long ans = 2019;
    int icnt = 0;
    for (long long i = l; i < r; i++) {
        int jcnt = 0;
        for (long long j = i+1; i <= r; i++) {
            ans = min(ans, i*j%2019);
            jcnt++;
            if (jcnt == 2020) break;
        }
        icnt++;
        if (icnt == 2020) break;
    }
    cout << ans << endl;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
#define BE(x) x.begin(), x.end()

int main() {
    long long l, r;
    cin >> l >> r;

    long long ans = 2019;
    int icnt = 0;
    for (long long i = l; i < r; i++) {
        int jcnt = 0;
        for (long long j = i+1; i <= r; i++) {
            ans = min(ans, i*j%2019);
            jcnt++;
            if (jcnt == 2019) break;
        }
        icnt++;
        if (icnt == 2019) break;
    }
    cout << ans << endl;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
#define BE(x) x.begin(), x.end()

int main() {
    long long l, r;
    cin >> l >> r;

    int ans = 2019, icnt = 0;
    for (int i = l; i < r; i++) {
        int jcnt = 0;
        for (int j = i+1; i <= r; i++) {
            ans = min (ans, i*j%2019);
            jcnt++;
            if (jcnt == 2019) break;
        }
        icnt++;
        if (icnt == 2019) break;
    }
    cout << ans << endl;
}
//  [c]
#include<stdio.h>

int main(void)
{
  long long min=10000;
  long long l,r;
  scanf("%lld %lld",&l,&r);


  for(long long i=l;i<r;i++){
    for(long long j=l+1;j<=r;j++){

      if((i*j)%2019==0&&i<j){
        puts("0");
        return 0;
      }
      if((i*j)%2019<min&&i<j){
        min=(i*j)%2019;
      }
    }
  }

  printf("%lld\n",min);
  return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define MOD1 1000000007
#define MOD2 998244353
#define LIMIT1 200002
#define LIMIT2 500002
typedef long long ll;
typedef long double ld;
#define rep(i,n) for(i=0;i<n;i++)
#define max(a,b) ((a)>(b) ? (a) : (b))
#define min(a,b) ((a)<(b) ? (a) : (b))
#define zt(a,b) (max(a,b)-min(a,b))
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll nPr(int n,int r){ll i,result=1;rep(i,r){result*=(ll)(n-i);}return result;}
ll nCr(int n,int r){ll i,result=1; rep(i,min(r,n-r)){result*=(ll)(n-i);result/=(ll)(i+1);}return result;}
#define fact(n) nPr((int)n,(int)n)
#define nHr(n,r) nCr((int)(n+r+1),(int)r)
#define sankaku(x) ((1+x)*x)/2
int dx[8]={1,0,-1,0,1,-1,-1,1};
int dy[8]={0,1,0,-1,1,1,-1,-1};
int upint(const void *a, const void *b) { return *(int *)a < *(int *)b ? -1 : *(int *)a > *(int *)b ? 1 : 0; }
int downint(const void *a, const void *b) { return *(int *)a < *(int *)b ? 1 : *(int *)a > *(int *)b ? -1 : 0; }
int upchar(const void* left, const void* right) {return strcmp((char *)left,(char *)right);}
int downchar(const void* left, const void* right) {return strcmp((char *)right,(char *)left);}
void initialize(){
  
}
int main(void){
  initialize();
  ll n,m,i,j,l,r,result=-1;
  int a[LIMIT2]={0};
  char s[LIMIT1];

  scanf("%lld %lld",&l,&r);
  for(i=l;i<r;i++){
    for(j=i+1;j<=r;j++){
      if(result==-1) result = (i*j)%2019;
      else result = min(result, (i*j)%2019);
      
      if(result==0) break;
    }
    if(result==0) break;
  }
  printf("%lld", result);

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

int main(){

  long long i,j;
  long long min = 10000000;
  long long l,r;

  scanf("%lld %lld", &l, &r);

  for(i = l;i <= r;i++){
    for(j = l;j < i;j++){
      if(min > (i*j) % 2019) min = (i*j) % 2019;

      if(min == 0){
        printf("0\n");
        return 0;
      }
    }
  }

  printf("%lld\n", min);
  return 0;
}