«One dragon. Two dragon. Three dragon», — the princess was counting. She had trouble falling asleep, and she got bored of counting lambs when she was nine.However, just counting dragons was boring as well, so she entertained herself at best she could. Tonight she imagined that all dragons were here to steal her, and she was fighting them off. Every k-th dragon got punched in the face with a frying pan. Every l-th dragon got his tail shut into the balcony door. Every m-th dragon got his paws trampled with sharp heels. Finally, she threatened every n-th dragon to call her mom, and he withdrew in panic.How many imaginary dragons suffered moral or physical damage tonight, if the princess counted a total of d dragons?

Input data contains integer numbers k, l, m, n and d, each number in a separate line (1 ≤ k, l, m, n ≤ 10, 1 ≤ d ≤ 105).

NoteIn the first case every first dragon got punched with a frying pan. Some of the dragons suffered from other reasons as well, but the pan alone would be enough.In the second case dragons 1, 7, 11, 13, 17, 19 and 23 escaped unharmed.

let inputString = "";
let currentLine = 0;
process.stdin.on("data", (data) => {
  inputString += data;
});
process.stdin.on("end", function () {
  inputString = inputString
    .trim()
    .split("\n")
    .map((str) => str.trim());
  main();
});
function readLine() {
  return inputString[currentLine++];
}
function main() {
  const k = +readLine();
  const l = +readLine();
  const m = +readLine();
  const n = +readLine();
  const d = +readLine();
  const arr = Array(d).fill(1);
  let count = 0;
  function isDivisible(num) {
    return num % k === 0 || num % l === 0 || num % m === 0 || num % n === 0;
  }
  for (let i = 0; i < d; i++) {
    if (arr[i] === 1 && isDivisible(i + 1)) {
      arr[i] = -1;
    }
  }
  for (let i = 0; i < d; i++) {
    if (arr[i] === -1) count++;
  }
  console.log(count);
}

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin, output: process.stdout
});
var obj; var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error("\n");
  var start = Date.now();
  Main();
  var end = Date.now() - start;
  myerr("time : " + (end) + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function makeClone(obj){return JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
  return {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw "ArrayIndexOutOfBoundsException ‚There is no more input";}}
  };
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
  var K = nextInt();
  var L = nextInt();
  var M = nextInt();
  var D = nextInt();
  var N = nextInt();
  var output = 0;
  for(var i = 1; i <= N; i++){
    if(i % K == 0 || i % L == 0 || i % M == 0 || i % D == 0){
      output++;
    }
  }
  myout(output);
}

//Insomnia cure

const {EOL} = require('os');

let inp = '';

process.stdin.on('data', c => inp += c);

process.stdin.on('end', () => {
    let lines = inp.split(EOL).map(c => +c);

    let gcd = (a, b) =>  {
    	if(b == 0)  {
    		return a;
    	}
    	return gcd(b, a % b);
    };

    let lcm = (a, b) => (a * b) / gcd(a, b);

    let thr = lines.slice(0, 4);

    let flg = true;
    for(let i in thr)  {
        if(thr[i] <= lines[4])  {
            flg = false;
            break;
        }
    }
    if(flg)  {
        process.stdout.write('0');
        return;
    }

    let thrx = [];

    for(let i = 0; i < thr.length; i++)  {
    	let addflg = true;
    	for(let j = 0; j < thrx.length; j++)  {
    		if(thr[i] % thrx[j] == 0)  {
    			addflg = false;
    			break;
    		}
    		if(thrx[j] % thr[i] == 0)  {
    			thrx[j] = thr[i];
    			addflg = true;
    			break;
    		}
    	}
		if(addflg)  {
			thrx.push(thr[i]);
		}
    }

    let thrf = [thrx, [], [], []];
    for(let i = 0; i < thrx.length; i++)  {
    	for(let j = i + 1; j < thrx.length; j++)  {
    		let l1 = lcm(thrx[i], thrx[j]);
    		for(let k = j + 1; k < thrx.length; k++)  {
    			let l2 = lcm(l1, thrx[k]);
    			for(let l = k + 1; l < thrx.length; l++)  {
    				thrf[3].push(lcm(l2, thrx[l]));
    			}
    			thrf[2].push(l2);
    		}
    		thrf[1].push(l1);
    	}
    }

    let calc = (i) => Math.floor(lines[4] / i);

    let res = 0;

    for(let i = 0; i < thrf.length; i++)  {
    	let sum = 0;
    	for(let j in thrf[i])  {
    		sum += calc(thrf[i][j]);
    	}
    	res += (1 - ((i % 2) * 2)) * sum;
    }

    process.stdout.write(res + '');

    return;
});

//Insomnia cure

const {EOL} = require('os');

let inp = '';

process.stdin.on('data', c => inp += c);

process.stdin.on('end', () => {
    let lines = inp.split(EOL).map(c => +c);

    let gcd = (a, b) =>  {
    	if(b == 0)  {
    		return a;
    	}
    	return gcd(b, a % b);
    };

    let lcm = (a, b) => (a * b) / gcd(a, b);

    let thr = lines.slice(0, 4);

    let flg = 2;
    for(let i in thr)  {
        if(thr[i] < lines[4])  {
            flg = 0;
            break;
        }
        if(thr[i] == lines[4])  {
            flg = 1;
        }
    }
    if(flg == 2)  {
        process.stdout.write('0');
        return;
    }
    // if(flg == 1)  {
    //     process.stdout.write('1');
    //     return;
    // }

    let thrx = [];

    for(let i = 0; i < thr.length; i++)  {
    	let addflg = true;
    	for(let j = 0; j < thrx.length; j++)  {
    		if(thr[i] % thrx[j] == 0)  {
    			addflg = false;
    			break;
    		}
    		if(thrx[j] % thr[i] == 0)  {
    			thrx[j] = thr[i];
    			addflg = true;
    			break;
    		}
    	}
		if(addflg)  {
			thrx.push(thr[i]);
		}
    }

    let thrf = [thrx, [], [], []];
    for(let i = 0; i < thrx.length; i++)  {
    	for(let j = i + 1; j < thrx.length; j++)  {
    		let l1 = lcm(thrx[i], thrx[j]);
    		for(let k = j + 1; k < thrx.length; k++)  {
    			let l2 = lcm(l1, thrx[k]);
    			for(let l = k + 1; l < thrx.length; l++)  {
    				thrf[3].push(lcm(l2, thrx[l]));
    			}
    			thrf[2].push(l2);
    		}
    		thrf[1].push(l1);
    	}
    }

    let calc = (i) => Math.floor(lines[4] / i);

    let res = 0;

    for(let i = 0; i < thrf.length; i++)  {
    	let sum = 0;
    	for(let j in thrf[i])  {
    		sum += calc(thrf[i][j]);
    	}
    	res += (1 - ((i % 2) * 2)) * sum;
    }

    process.stdout.write(res + '');

    return;
});

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;
let k, l, m, n, d;

rl.on('line', (data) => {
  if (c === 0) {
    k = +data;
    c++;
    return;
  }

  if (c === 1) {
    l = +data;
    c++;
    return;
  }

  if (c === 2) {
    m = +data;
    c++;
    return;
  }

  if (c === 3) {
    n = +data;
    c++;
    return;
  }

  if (c === 4) {
    d = +data;
    c++;
  }

  let ans = 0;
  for (let i = 1; i <= d; i++) {
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {
      ans++;
    }
  }

  console.log(ans);

  c++;
});

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;
let k, l, m, n, d;
let ans = 0;

rl.on('line', (data) => {
  if (c === 0) {
    k = +data;
    c++;
    return;
  }

  if (c === 1) {
    l = +data;
    c++;
    return;
  }

  if (c === 2) {
    m = +data;
    c++;
    return;
  }

  if (c === 3) {
    n = +data;
    c++;
    return;
  }

  if (c === 4) {
    d = +data;
    c++;
  }

  for (let i = 1; i <= d; i++) {
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {
      ans++;
    }
  }

  console.log(ans);

  c++;
});

const readLine = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout,
});

const input = [];
readLine.on('line', line => input.push(line));

readLine.on('close', () => {
  const k = parseInt(input[0]);
  const l = parseInt(input[1]);
  const m = parseInt(input[2]);
  const n = parseInt(input[3]);
  const d = parseInt(input[4]);

  let answ = 0;
  for (let i = 1; i <= d; i += 1) {
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) answ += 1;
  }

  console.log(answ);
});

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

function readLine() {
	return inputString[currentLine++];
}

function isPrime(x) {
	let s = Math.sqrt(x);
	let i = 2;
	while (i <= s) {
		if (x % i === 0) {
			return false;
		}
		i++;
	}
	return true;
}

function main() {
	let k = readLine() >> 0,
		l = readLine() >> 0,
		m = readLine() >> 0,
		n = readLine() >> 0,
		d = readLine() >> 0;

	let hit = 0;
	for (let i = 1; i <= d; ++i)
		if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) hit++;

	console.log(hit);
}

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', (inputStd) => {
    inputString += inputStd;
});
process.stdin.on('end', function () {
    inputString = inputString
        .trim()
        .split('\n')
        .map((str) => {
            return str.trim();
        });
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());

    let result = d;

    if (k === 1 || l === 1 || m === 1 || n === 1) {
        console.log(result);
        return;
    }

    for (let i = 1; i <= d; i++) {
        if (i % k !== 0 && i % l !== 0 && i % m !== 0 && i % n !== 0) {
            result--;
        }
    }
    console.log(result);
}

let fs = require("fs");

let txt = fs.readFileSync(0, "utf-8").split("\r\n").filter(data => data.length > 0);

for (let i = 0; i < txt.length; i += 5) {
    doit(txt[i + 4] * 1, txt[i + 0] * 1, txt[i + 1] * 1, txt[i + 2] * 1, txt[i + 3] * 1);

}

function doit(total, ...num) {
    let score = 0;
    for (let i = 1; i <= total; i++) {
        for (let i1 = 0; i1 < num.length; i1++) {
            if (i % num[i1] === 0) {
                ++score;
                break;
            }

        }

    }
    console.log(score);
}

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

function main(input) {
    let output = nameLookUp(input);
    process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {
    let inputs = str.trim().replace(/\r/g, '').split('\n');
    let dragons = inputs.slice(0, inputs.length - 1);
    let totalDragons = +inputs[inputs.length - 1];
    let damagedDragons = 0;
    if (dragons.indexOf('1') !== -1) {
        damagedDragons = totalDragons;
    }
    else {

        for (let i = 1; i <= totalDragons; i++) {
            if (i % dragons[0] == 0 || i % dragons[1] == 0 || i % dragons[2] == 0 || i % dragons[3] == 0) {
                damagedDragons++;
            }
        }
    }

    return damagedDragons.toString();
}

// Sample code to perform I/O:

process.stdin.resume();
process.stdin.setEncoding("utf-8");
var stdin_input = "";

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

function main(input) {
    let output = nameLookUp(input);
    process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(str) {
    let inputs = str.trim().split('\n');
    let dragons = inputs.slice(0, inputs.length - 1);
    let totalDragons = +inputs[inputs.length - 1];
    let damagedDragons = [];

    for (let row of dragons) {
        for (let i = 1; i <= totalDragons; i++) {
            let multiple = row * i;
            if (multiple <= totalDragons) {
                damagedDragons.push(multiple);
            }
        }
    }
    damagedDragons = [...new Set(damagedDragons)].length;
    return damagedDragons.toString();
}

const readLine = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout,
});

const input = [];
readLine.on('line', line => input.push(line));

const dragons = () => {
    let [k,l,m,n,d] = input.map(x => +x);
    let count = 0;
    for (let i = 1; i <= d; i++) {
        if ( (i % n === 0) || (i % m === 0) ||
            (i % l === 0) || (i % k === 0) ) {
            count++;
        }
    }
    console.log(count);
};

readLine.on('close', dragons);

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.replace(/\s*$/, '')
        .split('\n')
        .map(str => str.replace(/\s*$/, ''));

    main();
});

function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());
    let cont = d;
    if (k == 1 || l == 1 || m == 1 || n == 1) {
        console.log(cont);
    } else {
        for (var i = 1; i <= d; i++) {
            if ((i % k != 0) && (i % l != 0) && (i % m != 0) && (i % n != 0)) {
                cont--;
            }
        }
        console.log(cont);
    }
}

var k = parseInt(readline());
var l= parseInt(readline());
var m= parseInt(readline());
var n= parseInt(readline());
var d= parseInt(readline());
var da = Array.from({length:d}, (_,i)=>i+1);
var output = [];
da.forEach(x=>{
    if(x%k===0 || x%l===0 || x%m===0 || x%n===0){
        output.push(x)
    }
})
print(output.length);

;(function () {

	var k = +readline();
	var l = +readline();
	var m = +readline();
	var n = +readline();
	var d = +readline();
	var p = 0;

	for (var i = 1; i <= d; i++) p += !(i%k) || !(i%l) || !(i%m) || !(i%n);

	print(p);

}).call(this);

function insomniaCure(k,l,m,n,d){
    var listDamage = [];
    for(var i=1;i*k<=d;i++) {
      listDamage.push(i*k);
    }
    for(var j=1;j*l<=d;j++) {
      listDamage.push(j*l);
    }
    for(var a=1;a*m<=d;a++) {
      listDamage.push(a*m);
    }
    for(var b=1;b*n<=d;b++) {
      listDamage.push(b*n);
    }
    var uniqueItems = Array.from(new Set(listDamage));
    return uniqueItems.length;
}
k = readline();
l = readline();
m = readline();
n = readline();
d = readline();
print(insomniaCure(parseInt(k),parseInt(l),parseInt(m),parseInt(n),parseInt(d)));

var r = readline
  var k = +r()
  var l = +r()
  var m = +r()
  var n = +r()
  var d = +r()
  var result = 0
  for (var i = 1; i <= d; i++) {
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {
      result++
    }
  }
  print(result)

var k = readline();
var l = readline();
var m = readline();
var n = readline();
var d = readline();
var count = 0;
for (var i = 1; i <= d; i++)
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0)
    count++;
print(count);

var k = parseInt(readline());
var l = parseInt(readline());
var m = parseInt(readline());
var n = parseInt(readline());
var d = parseInt(readline());
var damaged_dragon = 0;

for(var i = 1; i <= d; i++)
{
	if(i % k == 0 | i % l == 0 | i % m == 0 | i % n == 0)
		damaged_dragon++;
}

print(damaged_dragon);

'use strict';

(function() {
    let n1 = parseInt(readline()),
        n2 = parseInt(readline()),
        n3 = parseInt(readline()),
        n4 = parseInt(readline()),
        d = parseInt(readline());

  let obj = {};
  for(let i = 1; i<=d; i++){
    if(
      i % n1 === 0 ||
      i % n2 === 0 ||
      i % n3 === 0 ||
      i % n4 === 0
    ) {
      obj[i] = 1;
    }
  }

  write(Object.keys(obj).length);

})();

var k = parseInt(readline());
var l = parseInt(readline());
var m = parseInt(readline());
var n = parseInt(readline());
var d = parseInt(readline());
var mas = [];
var sum = 0;
for(var i = 0; i < d; ++i)
{
    mas[i] = true;
}
for(var i = k-1; i < d; i+=k)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = l-1; i < d; i+=l)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = m-1; i < d; i+=m)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = n-1; i < d; i+=n)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
print(sum);

var k = readline();
var l = readline();
var m = readline();
var n = readline();
var d = readline();
var res = 0;
	for (var i=1; i<+d+1; i++){
		if(i%k==0||i%l==0||i%m==0||i%n==0)
		res++;
	}
print(res);

var w = readline()
var x = readline()
var y = readline()
var z = readline()
var limit = readline()
var count = 0;
for(var i = 1; i <= limit; i++){
    if(i % w == 0 || i % x == 0 || i % y == 0 || i % z == 0){
        count++;
    }
}
print(count)

/* TEST CASE
input
1
2
3
4
12
output
12

input
2
3
4
5
24
output
17

Input
2
7
4
9
56937
Output
34795
Answer
35246

 */
function main() {
	var x = [1, 1, 1, 1];
	var i, j;
	for (i = 0; i < 4; i++) {
		x[i] = parseInt(readline());
	}
	var n = parseInt(readline());
	var y = new Array(n + 1);
	var answer = 0;
	for (i = x.length - 1; i >= 0; i--) {
		var p = x[i];
		for (j = p; j <= n; j += p) {
			if (!y[j]) {
				answer++;
				y[j] = true;
			}
		}
	}
	print(answer);
}

main();

var k  = Number(readline());
var l  = Number(readline());
var m  = Number(readline());
var n  = Number(readline());
var d  = Number(readline());

var count = 0;

for (var i = 1; i <= d; i++) {
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {
        count++;
    }
}

print(count);

var k = parseInt(readline());
var l = parseInt(readline());
var m = parseInt(readline());
var n = parseInt(readline());
var d = parseInt(readline());
var res = 0;
for (var i = 1; i <= d; i++) {
	if (i % k == 0 || i % l == 0 || i % m == 0 || i % n == 0) {
    	res ++;
    }
}

print(res);

var input = [];
var receiveAnArray = function(num)
    {
        var arr = [];
        for (var i = 1; i <= num; i++)
        {
            arr.push('.');
        }
        return arr;
    }
var deleteElements = function(arr, input)
    {
        for (var i = input - 1; i <= arr.length - 1; i += input)
        {
            arr.splice(i, 1, '');
			if (arr.length === 0) break;
        }
        return arr;
    }
for (var i = 1; i <= 4; i++)
{
    input.push(+readline());
}
var arr = receiveAnArray(+readline());
for (var i = 0; i <= 3; i++)
{
	arr = deleteElements(arr, input[i]);
}
print(arr.length - arr.join('').length);

var k = parseInt(readline(), 10),
    l = parseInt(readline(), 10),
    m = parseInt(readline(), 10),
    n = parseInt(readline(), 10),
    d = parseInt(readline(), 10);

var num = 0;

if(k!==1 && l !== 1 && m !== 1 && n !== 1) {
    for(var i=1; i<=d; i++) {
        if(i%k === 0 || i%l === 0 || i%m === 0 || i%n === 0) num++;
    }
    print(num);
} else {
    print(d);
}

var k = parseInt(readline());
var l = parseInt(readline());
var m = parseInt(readline());
var n = parseInt(readline());
var d = parseInt(readline());

var damagedDragons = 0;

for(var i = 1; i <= d; i++)
{
    if(i % k == 0 || i % l == 0 || i % m == 0 || i % n == 0)
        damagedDragons++;
}

print(damagedDragons);

// var line = readline().split(' ');
// var n = parseInt(line[0]);

var k = parseInt(readline());
var l = parseInt(readline());
var m = parseInt(readline());
var n = parseInt(readline());
var d = parseInt(readline());

var toK = k;
var toL = l;
var toM = m;
var toN = n;

var damaged = 0;
var i = 0;

for (i = 1; i <= d; i++) {
  if (--toK === 0) {
    toK = k;
  }
  if (--toL === 0) {
    toL = l;
  }
  if (--toM === 0) {
    toM = m;
  }
  if (--toN === 0) {
    toN = n;
  }
  if (toK === k || toL === l || toM === m || toN === n) {
    damaged++;
  }
}

write(damaged);

(function main() {

    var k = parseInt(readline());
    var l = parseInt(readline());
    var m = parseInt(readline());
    var n = parseInt(readline());
    var d = parseInt(readline());

    var dragons = [];
    for (var i = 0; i < d; i++){
        dragons[i] = false;
    }

    var each = d;
    while(each >= 0){
        dragons[each] = true;
        each -= k;
    }

    each = d;
    while(each >= 0){
        dragons[each] = true;
        each -= l;
    }

    each = d;
    while(each >= 0){
        dragons[each] = true;
        each -= m;
    }

    each = d;
    while(each >= 0){
        dragons[each] = true;
        each -= n;
    }

    var count = 0;
    for (var i = 0; i < d; i++){
        if (dragons[i]){
            count++;
        }
    }

    print(count);

    return 0;
})();

var k = Number(readline());
var l = Number(readline());
var m = Number(readline());
var n = Number(readline());
var d = Number(readline());

var count = 0;
for (var i = 1; i <= d; ++i) {
  if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0)
    count++;
}

print(count);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 1;i <= n; ++i){
  dragons.push(i);
}
var result = dragons.filter((dragon) => {
  if(dragon % Number(a) === 0 || dragon % Number(b) === 0 || dragon % Number(c) === 0 || dragon % Number(d) === 0){
    return true;
  }
  return false;
}).length;

print(result);

(function main() {
    //var s1 = readline().toLowerCase();
    //var s2 = readline().toLowerCase();
    var k = readline().split(' ').map(Number),
        l = readline().split(' ').map(Number),
        m = readline().split(' ').map(Number),
        n = readline().split(' ').map(Number),
        d = readline().split(' ').map(Number),
        ans = 0;
    for (var i = 1; i <= d; i++) {
        if (!(i % k && i % l && i % m && i % n)) {
            ans++;
        }
    }
    print(ans);
})()

function getAns(k,l,m,n,d){
    var ans=0;
    for (var i=1;i<=d;i++){
        if (i%k===0||i%l===0||i%m===0||i%n===0) ans++;
        }
    return ans;
}

var r=readline;
var k=+r(),l=+r(),m=+r(),n=+r(),d=+r();
print(getAns(k,l,m,n,d));

var x = parseInt(readline()),
 y = parseInt(readline()),
 z = parseInt(readline()),
 k = parseInt(readline()),
 d = parseInt(readline());
var str = [];
for(var i=0;i<d;i++){
	if((i+1)%x!=0 && (i+1)%y!=0 && (i+1)%z!=0 && (i+1)%k!=0){str = str + "1"}
}
print(d - str.length)

var k = +readline(), l = +readline(), m = +readline(), n = +readline(), d = +readline();
var a = [k,l,m,n], b = [];
a.sort(function(a,b){return a-b});
for(i = 0; i < d; i++){
	b.push(i+1);
}

for(i = 0; i < b.length; i++){
	if( b[i]%a[0] == 0 ){
		b.splice(i,1);
		i--;
	}
	else if( b[i]%a[1] == 0 ){
		b.splice(i,1);
		i--;
	}
	else if( b[i]%a[2] == 0 ){
		b.splice(i,1);
		i--;
	}
	else if( b[i]%a[3] == 0 ){
		b.splice(i,1);
		i--;
	}
}

write(d-b.length);

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answerMas = [d], answer = 0;

for (var i = 0; i < d; i += 1) {
    answerMas[i] += 0;
}

for(var i = 1; i <= d; i+=1) {
    var flag = false;
    if(i % k === 0) {
        answerMas[i] = 1;
    }

    if(i % l === 0) {
        answerMas[i] = 1;
    }

    if(i % m === 0) {
        answerMas[i] = 1;
    }

    if(i % n === 0) {
        answerMas[i] = 1;
    }
}

for (var i = 1; i <= d; i += 1) {
    if(answerMas[i]) {
        answer+=1;
    }
}

write(answer);

var k = readline();
var l = readline();
var m = readline();
var n = readline();
var d = readline();

var sum = 0;
var i = 0;

for(i=1; i<=d; i++)
{
  if ((i%k == 0)||(i%l == 0)||(i%m == 0)||(i%n == 0)) sum++;
}

print(sum);

var k = [];
for (var i = 0; i < 4; i++) {
    k[i] = readline() - 0;
}
var d = readline() - 0;

var prod = k.reduce((a,b) => a*b);

var s = -Math.floor(d / LCP(k));
for (var i = 0; i < 4; i++) {
    s += Math.floor(d / k[i]);
    var arr = k.slice(0);
    arr.splice(i, 1);
    s += Math.floor(d / LCP(arr));
}
for (var i = 0; i < 4; i++) {
    for (var j = i + 1; j < 4; j++) {
        s -= Math.floor(d / LCP([k[i], k[j]]));
    }
}
print(s);
function GCD(a, b) {
    while (a > 0 && b > 0) {
        if (a > b) {
            a %= b;
        } else {
            b %= a;
        }
    }
    return a + b;
}
function LCP_(a, b) {
    var gcd = GCD(a, b);
    return a * b / gcd;
}
function LCP(arr) {
    var r = arr.reduce((a,b) => LCP_(a,b));
    return r;
}

function readNums() {
    return readline().split(' ').map(v => v - 0);
}

var k = parseInt( readline() );
var l = parseInt( readline() );
var m = parseInt( readline() );
var n = parseInt( readline() );
var d = parseInt( readline() );

for(var count=0,i=1;i<=d;i++){
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0){
        count++;
    }
}

print(count);

var k = parseInt(readline()),
	l = parseInt(readline()),
	m = parseInt(readline()),
	n = parseInt(readline()),
	d = parseInt(readline()),
	counter = 0

while (d > 0) {
	if (d % k == 0 || d % l == 0 || d % m == 0 || d % n == 0)
		counter ++
	d --
}

print(counter)

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin, output: process.stdout
});
var obj; var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error("\n");
  var start = Date.now();
  Main();
  var end = Date.now() - start;
  myerr("time : " + (end) + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function makeClone(obj){return JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
  return {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw "ArrayIndexOutOfBoundsException ‚There is no more input";}}
  };
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
  var K = nextInt();
  var L = nextInt();
  var M = nextInt();
  var D = nextInt();
  var N = nextInt();
  var output = 0;
  for(var i = 1; i <= N; i++){
    if(i % K == 0 || i % L == 0 || i % K == M || i % D == 0){
      output++;
    }
  }
  myout(output);
}

//Insomnia cure

const {EOL} = require('os');

let inp = '';

process.stdin.on('data', c => inp += c);

process.stdin.on('end', () => {
    let lines = inp.split(EOL).map(c => +c);

    let gcd = (a, b) =>  {
    	if(b == 0)  {
    		return a;
    	}
    	return gcd(b, a % b);
    };

    let lcm = (a, b) => (a * b) / gcd(a, b);

    let thr = lines.slice(0, 4);

    let flg = true;
    for(let i in thr)  {
        if(thr[i] < lines[4])  {
            flg = false;
        }
    }
    if(flg)  {
        process.stdout.write('0');
        return;
    }

    let thrx = [];

    for(let i = 0; i < thr.length; i++)  {
    	let addflg = true;
    	for(let j = 0; j < thrx.length; j++)  {
    		if(thr[i] % thrx[j] == 0)  {
    			addflg = false;
    			break;
    		}
    		if(thrx[j] % thr[i] == 0)  {
    			thrx[j] = thr[i];
    			addflg = true;
    			break;
    		}
    	}
		if(addflg)  {
			thrx.push(thr[i]);
		}
    }

    let thrf = [thrx, [], [], []];
    for(let i = 0; i < thrx.length; i++)  {
    	for(let j = i + 1; j < thrx.length; j++)  {
    		let l1 = lcm(thrx[i], thrx[j]);
    		for(let k = j + 1; k < thrx.length; k++)  {
    			let l2 = lcm(l1, thrx[k]);
    			for(let l = k + 1; l < thrx.length; l++)  {
    				thrf[3].push(lcm(l2, thrx[l]));
    			}
    			thrf[2].push(l2);
    		}
    		thrf[1].push(l1);
    	}
    }

    let calc = (i) => Math.floor(lines[4] / i);

    let res = 0;

    for(let i = 0; i < thrf.length; i++)  {
    	let sum = 0;
    	for(let j in thrf[i])  {
    		sum += calc(thrf[i][j]);
    	}
    	res += (1 - ((i % 2) * 2)) * sum;
    }

    process.stdout.write(res + '');

    return;
});

//Insomnia cure

const {EOL} = require('os');

let inp = '';

process.stdin.on('data', c => inp += c);

process.stdin.on('end', () => {
    let lines = inp.split(EOL).map(c => +c);

    let gcd = (a, b) =>  {
    	if(b == 0)  {
    		return a;
    	}
    	return gcd(b, a % b);
    };

    let lcm = (a, b) => (a * b) / gcd(a, b);

    let thr = lines.slice(0, 4);

    let flg = true;
    for(let i in thr)  {
        if(thr[i] >= lines[4])  {
            flg = false;
        }
    }
    if(flg)  {
        process.stdout.write('0');
        return;
    }

    let thrx = [];

    for(let i = 0; i < thr.length; i++)  {
    	let addflg = true;
    	for(let j = 0; j < thrx.length; j++)  {
    		if(thr[i] % thrx[j] == 0)  {
    			addflg = false;
    			break;
    		}
    		if(thrx[j] % thr[i] == 0)  {
    			thrx[j] = thr[i];
    			addflg = true;
    			break;
    		}
    	}
		if(addflg)  {
			thrx.push(thr[i]);
		}
    }

    let thrf = [thrx, [], [], []];
    for(let i = 0; i < thrx.length; i++)  {
    	for(let j = i + 1; j < thrx.length; j++)  {
    		let l1 = lcm(thrx[i], thrx[j]);
    		for(let k = j + 1; k < thrx.length; k++)  {
    			let l2 = lcm(l1, thrx[k]);
    			for(let l = k + 1; l < thrx.length; l++)  {
    				thrf[3].push(lcm(l3, thrx[l]));
    			}
    			thrf[2].push(l2);
    		}
    		thrf[1].push(l1);
    	}
    }

    let calc = (i) => Math.floor(lines[4] / i);

    let res = 0;

    for(let i = 0; i < thrf.length; i++)  {
    	let sum = 0;
    	for(let j in thrf[i])  {
    		sum += calc(thrf[i][j]);
    	}
    	res += (1 - ((i % 2) * 2)) * sum;
    }

    process.stdout.write(res + '');

    return;
});

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;
let k, l, m, n, d;

rl.on('line', (data) => {
  if (c === 0) {
    k = +data;
    c++;
    return;
  }

  if (c === 1) {
    l = +data;
    c++;
    return;
  }

  if (c === 2) {
    m = +data;
    c++;
    return;
  }

  if (c === 3) {
    n = +data;
    c++;
    return;
  }

  if (c === 4) {
    d = +data;
    c++;
  }

  let ans = Math.ceil(d / k) + Math.ceil(d / l) + Math.ceil(d / m) + Math.ceil(d / n) - Math.ceil(d / (k * l)) - Math.ceil(d / (k * m)) - Math.ceil(d / (k * n)) - Math.ceil(d / (l * m)) - Math.ceil(d / (l * n)) - Math.ceil(d / (m * n)) + Math.ceil(d / (k * l * m)) + Math.ceil(d / (k * l * n)) + Math.ceil(d / (l * m * n)) - Math.ceil(d / (k * l * m * n));

  if (k === 1 || l === 1 || m === 1 || n === 1) {
    ans = d;
  }

  console.log(ans);
  // for (let i = 1; i <= d; i++) {
  //   if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0) {
  //     ans++;
  //   }
  // }

  // console.log(ans);

  c++;
});

const readLine = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout,
});

const input = [];
readLine.on('line', line => input.push(line));

readLine.on('close', () => {
  const k = parseInt(input[0]);
  const l = parseInt(input[1]);
  const m = parseInt(input[2]);
  const n = parseInt(input[3]);
  const d = parseInt(input[4]);

  let answ = 0;
  for (let i = 1; i <= d; i += 1) {
    if (i % k === 0 || i % l === 0 || i % m === 0 || i % n === 0 || i % d === 0) answ += 1;
  }

  console.log(answ);
});

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', (inputStd) => {
    inputString += inputStd;
});
process.stdin.on('end', function () {
    inputString = inputString
        .trim()
        .split('\n')
        .map((str) => {
            return str.trim();
        });
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());

    let result = d;

    if (k == 1 || l == 1 || m == 1 || n == 1) {
        console.log(result);
        return;
    } else {
        for (let i = 1; i <= d; i++) {
            if (k % i !== 0 && l % i !== 0 && m % i !== 0 && n % i !== 0) {
                result--;
            }
        }
        console.log(result);
    }
}

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', (inputStd) => {
    inputString += inputStd;
});
process.stdin.on('end', function () {
    inputString = inputString
        .trim()
        .split('\n')
        .map((str) => {
            return str.trim();
        });
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());

    let result = 0;
    for (let i = 1; i <= d; i++) {
        if (k % i === 0 || l % i === 0 || m % i === 0 || n % i === 0) {
            result++;
        }
    }
    console.log(result);
}

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', (inputStd) => {
    inputString += inputStd;
});
process.stdin.on('end', function () {
    inputString = inputString
        .trim()
        .split('\n')
        .map((str) => {
            return str.trim();
        });
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());

    let result = d;

    if (k == 1 || l == 1 || m == 1 || n == 1) {
        console.log(result);
        return;
    } else {
        for (let i = 1; i <= d; i++) {
            if (i % k !== 0 && i % l !== 0 && i % m !== 0 && i % m !== 0) {
                result--;
            }
        }
        console.log(result);
    }
}

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', (inputStd) => {
    inputString += inputStd;
});
process.stdin.on('end', function () {
    inputString = inputString
        .trim()
        .split('\n')
        .map((str) => {
            return str.trim();
        });
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());

    let result = d;

    if (k == 1 || l == 1 || m == 1 || n == 1) {
        console.log(result);
        return;
    }
    for (let i = 1; i <= d; i++) {
        if (k % i !== 0 && l % i !== 0 && m % i !== 0 && n % i !== 0) {
            result--;
        }
    }
    console.log(result);
}

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', (inputStd) => {
    inputString += inputStd;
});
process.stdin.on('end', function () {
    inputString = inputString
        .trim()
        .split('\n')
        .map((str) => {
            return str.trim();
        });
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());

    let result = d;

    for (let i = 1; i <= d; i++) {
        if (k % i !== 0 && l % i !== 0 && m % i !== 0 && n % i !== 0) {
            result--;
        }
    }
    console.log(result);
}

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.replace(/\s*$/, '')
        .split('\n')
        .map(str => str.replace(/\s*$/, ''));

    main();
});

function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());
    if (k == 1 || l == 1 || m == 1 || n == 1) {
        console.log(d);
    } else {
        for (var i = 1; i <= 24; i++) {
            if (i % k != 0 && i % l != 0 && i % m != 0 && i % n != 0) {
                d--;
            }
        }
        console.log(d);
    }
}

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.replace(/\s*$/, '')
        .split('\n')
        .map(str => str.replace(/\s*$/, ''));

    main();
});

function readLine() {
    return inputString[currentLine++];
}

function main() {
    let k = parseInt(readLine());
    let l = parseInt(readLine());
    let m = parseInt(readLine());
    let n = parseInt(readLine());
    let d = parseInt(readLine());
    if (k == 1 || l == 1 || m == 1 || n == 1) {
        console.log(d);
    } else {
        for (var i = 1; i <= d; i++) {
            if (i % k != 0 && i % l != 0 && i % m != 0 && i % n != 0) {
                d--;
            }
        }
        console.log(d);
    }
}

var k = parseInt(readline());
var l= parseInt(readline());
var m= parseInt(readline());
var n= parseInt(readline());
var d= parseInt(readline());
var da = Array.from({length:d}, (_,i)=>i+1);
var output = [];
da.forEach(x=>{
    if(x%k===0 || x%l===0 || x%m===0 || x%n===0){
         print("exist: ",x)
        output.push(x)
    }
})
print(output);

var k = parseInt(readline());
var l= parseInt(readline());
var m= parseInt(readline());
var n= parseInt(readline());
var d= parseInt(readline());
var da = Array.from({length:d}, (_,i)=>i+1);
var output = [];
da.forEach(x=>{
    if(x%k===0 || x%l===0 || x%m===0 || x%n===0){
        output.push(x)
    }
})
print(output);

var k = parseInt(readline());
var l= parseInt(readline());
var m= parseInt(readline());
var n= parseInt(readline());
var d= parseInt(readline());
var arr= [k,l,m,n];
var output = [];
arr.forEach(e=>{
    Array.from({length:d}, (_,i)=>i+1).forEach(x=>{
        if(x%e === 0){
            output.push(x)
        }
    })

})
var output = output.filter((v,i,a)=>a.indexOf(v)===i);
print(output.reduce((a,b)=>a+b,0));

var line
  var input = []
  while (line = readline()) {
    input.push(line)
  }

  var length = input[input.length - 1]

  var actionInx = {}

  for (var i = 0; i < input.length - 1; i++) {
    if (actionInx[input[i]] === undefined) {
      actionInx[input[i]] = [i]
    } else {
      actionInx[input[i]].push(i)
    }
  }

  for (var j = 0; j < length; j++) {
    var hashEntry = actionInx[j]
    if (hashEntry) {
      var len = hashEntry.length
      for (var k = 0; k < len; k++) {
        var newEntryKey = j + +input[hashEntry[k]]
        var newEntry = actionInx[newEntryKey]
        if (!newEntry && newEntryKey <= length) {
          actionInx[newEntryKey] = [hashEntry[k]]
        } else if (newEntry && newEntryKey <= length) {
          actionInx[newEntryKey].push(hashEntry[k])
        }
      }
    }
  }

  var result = Object.keys(actionInx).length

  print(result)

var k = parseInt(readline());
var l = parseInt(readline());
var m = parseInt(readline());
var n = parseInt(readline());
var d = parseInt(readline());
var mas = [];
var sum = 0;
for(var i = 0; i < d; ++i)
{
    mas[i] = true;
}
for(var i = 0; i < d && k < d; i+=k)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = 0; i < d && l < d; i+=l)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = 0; i < d && m < d; i+=m)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = 0; i < d && n < d; i+=n)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
print(sum);

var k = parseInt(readline());
var l = parseInt(readline());
var m = parseInt(readline());
var n = parseInt(readline());
var d = parseInt(readline());
var mas = [];
var sum = 0;
for(var i = 0; i < d; ++i)
{
    mas[i] = true;
}
for(var i = 0; i < d; i+=k)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = 0; i < d; i+=l)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = 0; i < d; i+=m)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
for(var i = 0; i < d; i+=n)
{
    if(mas[i])
    {
        mas[i] = false;
        sum ++;
    }
}
print(sum);

var k = readline();
var l = readline();
var m = readline();
var n = readline();
var d = readline();
var res = 0;
	for (var i=1; i<d; i++){
		if(i%k==0||i%l==0||i%m==0||i%n==0)
		res++;
	}
print(res);

var k = readline();
var l = readline();
var m = readline();
var n = readline();
var d = readline();
var res = 0;
	for (var i=0; i<d; i++){
		if(i%k==0||i%l==0||i%m==0||i%n==0)
		res++;
	}
print(res);

var k = readline();
var l = readline();
var m = readline();
var n = readline();
var d = readline();
var res = 0;
	for (var i=1; i<d+1; i++){
		if(i%k==0||i%l==0||i%m==0||i%n==0)
		res++;
	}
print(res);

/* TEST CASE
input
1
2
3
4
12
output
12

input
2
3
4
5
24
output
17

 */
function main() {
	var x = [], y = [];
	var i, j;
	for (i = 0; i < 4; i++) {
		var num = parseInt(readline());
		var need = true;
		for (j = x.length - 1; j >= 0; j--) {
			if (num <= x[j] && x[j] % num == 0) {
				x[j] = num;
				need = false;
				break;
			} else if (x[j] <= num && num % x[j] == 0) {
				need = false;
				break;
			}
		}
		if (need) {
			x.push(num);
		}
	}
	var z = parseInt(readline());
	var n = x.length;
	for (i = 0; i < n; i++) {
		for (j = i + 1; j < n; j++) {
			y.push(x[i] * x[j]);
		}
	}
//	print("x =", x);
//	print("y =", y);
//	print("z =", z);
	var answer = 0;

	for (i = 0; i < n; i++) {
		answer += Math.floor(z / x[i]);
	}
	for (i = y.length - 1; i >= 0; i--) {
		answer -= Math.floor(z / y[i]);
	}

	print(answer);
}

main();

var k = parseInt(readline(), 10),
    l = parseInt(readline(), 10),
    m = parseInt(readline(), 10),
    n = parseInt(readline(), 10),
    d = parseInt(readline(), 10);

var k_ar = [], l_ar = [], m_ar = [], n_ar = [];

if(k!==1 && l !== 1 && m !== 1 && n !== 1) {
    for(var i=1; k*i<=d || l*i<=d || m*i<=d; i++) {
        if(k*i <= d) k_ar.push(k*i);
        if(l*i <= d) l_ar.push(l*i);
        if(m*i <= d) m_ar.push(m*i);
        if(n*i <= d) n_ar.push(n*i);
    }

    print([...new Set([...k_ar, ...l_ar, ...m_ar, ...n_ar])].length);
} else {
    print(d);
}

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 0;i < n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){
    return true;
  }
  return false;
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = new Array(n);
for(var i = 0;i < n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){
    return true;
  }
}).length;
print(result)

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 1;i <= n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(a === 2){
    print(dragon);
  }
  if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){
    if(a === 2){
    print(dragon);
  }
    return true;
  }
  return false;
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 1;i <= n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){
    return true;
  }
  return false;
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 1;i <= n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(dragon % +a === 0 || dragon % +b === 0 || dragon % +c === 0 || dragon % +d === 0){
    return true;
  }
  return false;
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
print(a,b,c,d);
for(var i = 1;i <= n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){
    return true;
  }
  return false;
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = new Array(n);
for(var i = 0;i < n; ++i){
  dragons.push(i);
}
print(dragons.map((dragon) => {
  if(dragon % a === 0 && dragon % b === 0 && dragon % c === 0 && dragon % d === 0){
    return true;
  }
}).length - 1);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 1;i <= n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(dragon % Number(a) === 0 || dragon % Number(b) === 0 || dragon % Number(c) === 0 || dragon % Number(d) === 0){
    return true;
  }
  return false;
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 0;i < n; ++i){
  dragons.push(i);
}
print(dragons)
var result = dragons.map((dragon) => {
  if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){
    return true;
  }
  return false;
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = [];
for(var i = 0;i < n; ++i){
  dragons.push(i);
}
var result = dragons.map((dragon) => {
  if(dragon % a === 0 || dragon % b === 0 || dragon % c === 0 || dragon % d === 0){
    return true;
  }
}).length;

print(result);

var a = readline();
var b = readline();
var c = readline();
var d = readline();
var n = readline();
var dragons = new Array(n);
for(var i = 0;i < n; ++i){
  dragons.push(i);
}
print(dragons.map((dragon) => {
  if(dragon % a === 0 && dragon % b === 0 && dragon % c === 0 && dragon % d === 0){
    return true;
  }
}).length);

var x = parseInt(readline()),
 y = parseInt(readline()),
 z = parseInt(readline()),
 k = parseInt(readline()),
 d = parseInt(readline());
var str = [];
for(var i=0;i<d;i++){
	if((i+1)%x!=0 && (i+1)%y!=0 && (i+1)%z!=0 && (i+1)%k!=0){str[i]=i+1}
}
print(d - str.length)

var x = parseInt(readline()),
 y = parseInt(readline()),
 z = parseInt(readline()),
 k = parseInt(readline()),
 d = parseInt(readline());
 if(Math.ceil(d/x) + Math.ceil(d/y) + Math.ceil(d/z) + Math.ceil(d/k) < d)
	 print(Math.ceil(d/x) + Math.ceil(d/y) + Math.ceil(d/z) + Math.ceil(d/k))
 else print(d)

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answer;

answer = parseInt(d / k) + parseInt(d / l) + parseInt(d / m) + parseInt(d / n);

write(d - answer);

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answer = 0;

for(var i = 0; i < d; i+=1) {
    var flag = false;
    if(i % k === 0) {
        flag = true;
    }

    if(i % l === 0) {
        flag = true;
    }

    if(i % m === 0) {
        flag = true;
    }

    if(i % n === 0) {
        flag = true;
    }

    if(flag) {
        answer += 1;
    }
}

write(answer);

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answerMas = [d], answer;

for (var i = 0; i < d; i += 1) {
    answerMas[i] += 0;
}

for(var i = 0; i < d; i+=1) {
    var flag = false;
    if(i % k === 0) {
        answerMas[i] = 1;
    }

    if(i % l === 0) {
        answerMas[i] = 1;
    }

    if(i % m === 0) {
        answerMas[i] = 1;
    }

    if(i % n === 0) {
        answerMas[i] = 1;
    }
}

for (var i = 0; i < d; i += 1) {
    if(answerMas[i]) {
        answer+=1;
    }
}

write(answer);

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answer;

answer = parseInt(d / k) + parseInt(d / l) + parseInt(d / m) + parseInt(d / n);

write(answer);

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answerMas = [d], answer;

for(var i = 0; i < d; i+=1) {
    var flag = false;
    if(i % k === 0) {
        answerMas[i] = 1;
    }

    if(i % l === 0) {
        answerMas[i] = 1;
    }

    if(i % m === 0) {
        answerMas[i] = 1;
    }

    if(i % n === 0) {
        answerMas[i] = 1;
    }
}

for (var i = 0; i < d; i += 1) {
    if(answerMas[i]) {
        answer+=1;
    }
}

write(answer);

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answerMas = [d], answer = 0;

for (var i = 0; i < d; i += 1) {
    answerMas[i] += 0;
}

for(var i = 0; i < d; i+=1) {
    var flag = false;
    if(i % k === 0) {
        answerMas[i] = 1;
    }

    if(i % l === 0) {
        answerMas[i] = 1;
    }

    if(i % m === 0) {
        answerMas[i] = 1;
    }

    if(i % n === 0) {
        answerMas[i] = 1;
    }
}

for (var i = 0; i < d; i += 1) {
    if(answerMas[i]) {
        answer+=1;
    }
}

write(answer);

var k = parseInt(readline()), // каждому k-тому
    l = parseInt(readline()),
    m = parseInt(readline()),
    n = parseInt(readline()),
    d = parseInt(readline()),
    answerMas = [d], answer = 0;

for (var i = 0; i < d; i += 1) {
    answerMas[i] += 0;
}

for(var i = 1; i <= d; i+=1) {
    var flag = false;
    if(i % k === 0) {
        answerMas[i] = 1;
    }

    if(i % l === 0) {
        answerMas[i] = 1;
    }

    if(i % m === 0) {
        answerMas[i] = 1;
    }

    if(i % n === 0) {
        answerMas[i] = 1;
    }
}

for (var i = 0; i < d; i += 1) {
    if(answerMas[i]) {
        answer+=1;
    }
}

write(answer);

var k = readline();
var l = readline();
var m = readline();
var n = readline();
var d = readline();

var sum = 0;
var i = 0;

for(i=1; i<=d; i++)
{
  if ((d%k == 0)||(d%l == 0)||(d%m == 0)||(d%n == 0)) sum++;
}

print(sum);

var k = parseInt(readline());
var l= parseInt(readline());
var m= parseInt(readline());
var n= parseInt(readline());
var d= parseInt(readline());
var arr= [k,l,m,d];
var output = [];
arr.forEach(e=>{
    Array.from({length:d}, (_,i)=>i+1).forEach(x=>{
        if(x%e === 0){
            output.push(x)
        }
    })

})
var output = output.filter((v,i,a)=>a.indexOf(v)===i);
print(output.reduce((a,b)=>a+b,0));


This winter is so cold in Nvodsk! A group of n friends decided to buy k bottles of a soft drink called "Take-It-Light" to warm up a bit. Each bottle has l milliliters of the drink. Also they bought c limes and cut each of them into d slices. After that they found p grams of salt.To make a toast, each friend needs nl milliliters of the drink, a slice of lime and np grams of salt. The friends want to make as many toasts as they can, provided they all drink the same amount. How many toasts can each friend make?

The first and only line contains positive integers n, k, l, c, d, p, nl, np, not exceeding 1000 and no less than 1. The numbers are separated by exactly one space.

Print a single integer — the number of toasts each friend can make.

NoteA comment to the first sample: Overall the friends have 4 * 5 = 20 milliliters of the drink, it is enough to make 20 / 3 = 6 toasts. The limes are enough for 10 * 8 = 80 toasts and the salt is enough for 100 / 1 = 100 toasts. However, there are 3 friends in the group, so the answer is min(6, 80, 100) / 3 = 2.

print(function(n, k, l, c, d, p, nl, np){
	var a = ~~( k*l/nl );
	var b = c*d;
	var e = ~~( p/np );
	return ~~( Math.min(a,b,e)/n );
}.apply(0, readline().split(' ').map(Number)));

var input = readline().split(" "), n = +input[0], k = +input[1], l = +input[2], c = +input[3],
d = +input[4], p = +input[5], nl = +input[6], np = +input[7];

write(Math.floor(Math.min( (Math.floor(k * l / nl)), (Math.floor(c * d)), (Math.floor(p / np)) ) / n));

;(function () {

	var d = readline().split(' ').map(Number);

	print( Math.floor( Math.min( Math.floor(d[1] * d[2] / d[6]), d[3] * d[4], Math.floor(d[5] / d[7]) ) / d[0] ) );

}).call(this);

var str = readline().split(" ");
        // n,k,l,c, d, p,nl,np
n = +str[0], k = +str[1], l = +str[2], c = +str[3],
d = +str[4], p = +str[5], nl = +str[6], np = +str[7];

print(Math.floor(Math.min(k*l/nl, c*d, p/np)/n));

// 151A     Газировкопитие

// var n = parseInt(readline());

var input_line = readline().split(' ').map(Number);

var n = input_line[0];
var k = input_line[1];
var l = input_line[2];
var c = input_line[3];
var d = input_line[4];
var p = input_line[5];
var nl = input_line[6];
var np = input_line[7];

var gaz = k * l / nl / n;
var lame =c * d / n;
var sol = p / np / n;

var count =  Math.floor(Math.min(gaz, lame, sol));

print(count);

var numbers = readline().split(" ").map(function(x) { return parseInt(x); });

var allMl = (numbers[1]*numbers[2]) / numbers[6]; // l * k / nl
var allSclice = numbers[3]*numbers[4]; // c * d
var pgram = numbers[5]/ numbers[7] ; // p / np

var min  = function (x,y,z) {
    if (x <= y){
        if(x<= z){
            return x;
        }else {
            return z;
        }
    }else {
        if(y<=z){
            return y;
        }else{
            return z;
        }
    }
};

write(parseInt(min(allMl,allSclice,pgram)/numbers[0]));

let inputString = "";
let currentLine = 0;
process.stdin.on("data", (data) => {
  inputString += data;
});
process.stdin.on("end", function () {
  inputString = inputString
    .trim()
    .split("\n")
    .map((str) => str.trim());
  main();
});
function readLine() {
  return inputString[currentLine++];
}
function main() {
  const [n, k, l, c, d, p, nl, np] = readLine()
    .split(" ")
    .map((n) => parseInt(n));

  console.log(Math.floor(Math.min((k * l) / nl, c * d, p / np) / n));
}

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin, output: process.stdout
});
var obj; var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error('\n');
  var start = Date.now();
  Main();
  var end = Date.now() - start;
  myerr('time : ' + end + 'ms');
  myerr('memory : ' + Math.round(process.memoryUsage().heapTotal / 1024) + 'KB');
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
  return {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}}
  };
}
function myout(s){console.log(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
  var one = nextIntArray();
  var n = one[0];
  var k = one[1];
  var l = one[2];
  var c = one[3];
  var d = one[4];
  var p = one[5];
  var nl = one[6];
  var np = one[7];
  var allB = k * l;
  var allS = c * d;
  myout(Math.min.apply(null, [Math.floor(allB / nl / n), Math.floor(p / np / n), Math.floor(allS / n)]));
}

//Soft Drinking

const {EOL} = require('os');

let inp = '';

process.stdin.on('data', c => inp += c);

process.stdin.on('end', () => {
    let lines = inp.split(EOL)[0].split(' ');

    let n = +lines[0];
    let k = +lines[1];
    let l = +lines[2];
    let c = +lines[3];
    let d = +lines[4];
    let p = +lines[5];
    let nl = +lines[6];
    let np = +lines[7];

    process.stdout.write(Math.min(~~((k * l) / (n * nl)), ~~((c * d) / n), ~~(p / (n * np))) + '');

    return;
});

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});

rl.on('line', (data) => {
  let [n, k, l, c, d, p, nl, np] = data.split(' ').map(Number);

  let x = Math.floor(k * l / nl);
  let y = c * d;
  let z = Math.floor(p / np);
  let ans = Math.floor(Math.min(x, y, z) / n);

  console.log(ans);
});

const input = [];

const RL = require('readline').createInterface({
   input : process.stdin,
   output : process.stdout
});

RL.on('line', line => input.push(line));

RL.on('close', () => {
  const [n, k, l, c, d, p, nl, np] = input[0].split(' ').map(x => parseInt(x));
  let botl = parseInt((k * l) / nl);
  let lim  = c*d; let s = parseInt(p / np);

  console.log( parseInt(Math.min(botl, lim, s) / n) );
});

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

function readLine() {
	return inputString[currentLine++];
}

function isPrime(x) {
	let s = Math.sqrt(x);
	let i = 2;
	while (i <= s) {
		if (x % i === 0) {
			return false;
		}
		i++;
	}
	return true;
}

function main() {
	let [n, k, l, c, d, p, nl, np] = readLine()
		.split(' ')
		.map(x => x >> 0);

	let bottle = Math.floor((k * l) / nl);
	let limes = c * d;
	let salt = Math.floor(p / np);

	let res = Math.floor(Math.min(bottle, limes, salt) / n);
	console.log(res);
}

const input = [];

const RL = require('readline').createInterface({
   input : process.stdin,
   output : process.stdout
});

RL.on('line', line => input.push(line));

RL.on('close', () => {
  const [n, k, l, c, d, p, nl, np] = input[0].split(' ').map(x => parseInt(x));
  let botl = parseInt((k * l) / nl);
  let lim  = d; let s = parseInt(p / np);

  console.log( parseInt(Math.min(botl, lim, s) / n) );
});


You found a mysterious function f. The function takes two strings s1 and s2. These strings must consist only of lowercase English letters, and must be the same length.The output of the function f is another string of the same length. The i-th character of the output is equal to the minimum of the i-th character of s1 and the i-th character of s2.For example, f("ab", "ba") = "aa", and f("nzwzl", "zizez") = "niwel".You found two strings x and y of the same length and consisting of only lowercase English letters. Find any string z such that f(x, z) = y, or print -1 if no such string z exists.

The first line of input contains the string x. The second line of input contains the string y. Both x and y consist only of lowercase English letters, x and y have same length and this length is between 1 and 100.

If there is no string z such that f(x, z) = y, print -1. Otherwise, print a string z such that f(x, z) = y. If there are multiple possible answers, print any of them. The string z should be the same length as x and y and consist only of lowercase English letters.

NoteThe first case is from the statement.Another solution for the second case is "zizez"There is no solution for the third case. That is, there is no z such that f("ab", z) =  "ba".

// Polyfill for NodeJS
if (undefined == readline) {
	var rLines = require('fs').readFileSync("/dev/stdin", "utf8").split("\n"),
		rIndex = 0,
		readline = function() {
			rIndex ++
			return rLines[rIndex - 1]
		}
}
if (undefined == print) {
	var print = console.log
}

// Useful Read functions
var int = function() {
	return parseInt(readline())
}

var ints = function() {
	return readline().split(' ')
		.map(function(x) {
			return parseInt(x)
		})
}

var x = readline(),
	y = readline(),
	i = x.length - 1

while (i >= 0 && y.charCodeAt(i) <= x.charCodeAt(i)) i --

if (i > -1)
	print(-1)
else
	print(y)

  var str1 = readline();
  var str2 = readline();
  var flag = true;
  for(var i = 0; i < str1.length; i += 1) {
    if(str1[i] < str2[i]) {
      flag = false;
    }
  }
  if(flag) {
    print(str2);
  } else {
    print(-1);
  }

  var x = readline();
  var y = readline();
  var flag = true;
  for(var i = 0; i < x.length; i += 1) {
    if(x[i] < y[i]) {
      flag = false;
    }
  }
  if(flag) {
    print(y);
  } else {
    print(-1);
  }

var word1 = readline();
var word2 = readline();
var y = [];
var flag = true;

for (var i = 0; i < word1.length; i++){
    if (word1[i] < word2[i]){
        flag = false;
        break;
    }
    if (word1[i] == word2[i])
        y[i] = word1[i];
    else
        y[i] = word2[i];
        //y[i] = String.fromCharCode(word1.charCodeAt(i) - 1);;
}

if(flag)
    print(y.join(""));
else
    print(-1);

var x = readline().trim(), y = readline();
for (var i = 0; i < x.length; i++) {
    if (x[i] < y[i]) {
        y = "-1";
        break;
    }
}
print(y);

 var x = readline();
  var y = readline();
  var z = '';
  var flag = true;
  for(var i = 0; flag && i < x.length; i += 1) {
    if(x[i] < y[i]) {
      flag = false;
    }
  }
  if(flag) {
    print(y);
  } else {
    print(-1);
  }

var word1 = readline();
var word2 = readline();
var y = [];
var flag = true;

for (var i = 0; i < word1.length; i++){
    if (word1[i] < word2[i]){
        flag = false;
        break;
    }
    if (word1[i] == word2[i])
        y[i] = word1[i];
    else
        y[i] = String.fromCharCode(word1.charCodeAt(i) - 1);;
}

if(flag)
    print(y.join(""));
else
    print(-1);


Ted has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks for the first time. Then every s seconds after it, it barks twice with 1 second interval. Thus it barks at times t, t + s, t + s + 1, t + 2s, t + 2s + 1, etc.  Barney woke up in the morning and wants to eat the pineapple, but he can't eat it when it's barking. Barney plans to eat it at time x (in seconds), so he asked you to tell him if it's gonna bark at that time.

The first and only line of input contains three integers t, s and x (0 ≤ t, x ≤ 109, 2 ≤ s ≤ 109) — the time the pineapple barks for the first time, the pineapple barking interval, and the time Barney wants to eat the pineapple respectively.

Print a single "YES" (without quotes) if the pineapple will bark at time x or a single "NO" (without quotes) otherwise in the only line of output.

NoteIn the first and the second sample cases pineapple will bark at moments 3, 13, 14, ..., so it won't bark at the moment 4 and will bark at the moment 3.In the third and fourth sample cases pineapple will bark at moments 3, 11, 12, 19, 20, 27, 28, 35, 36, 43, 44, 51, 52, 59, ..., so it will bark at both moments 51 and 52.

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;

rl.on('line', (d) => {
  let [t, s, x] = d.split(' ').map(Number);
  let ans = 'NO';
  let val = t;

  if (val === x) {
    ans = 'YES';
  }

  let idx = 1;
  while (val <= x) {
    val = t + (idx * s);

    if (val === x) {
      ans = 'YES';
      break;
    }

    val = t + (idx * s) + 1;

    if (val === x) {
      ans = 'YES';
      break;
    }

    idx++;
  }

  console.log(ans);
  c++;
});

function rda(){ return readline().split(" ").map(Number); };
function rdn(){ return +readline(); };

var input = rda(), t = input[0], s = input[1], x = input[2];

var ans = "NO";
if(t == x){
    ans = "YES";
}else if(t > x){
    ans = "NO";
}else{
    if( ((x-t)%s == 0 || (x-t)%s == 1) && x-t != 0 && x-t != 1) ans = "YES";
}

write(ans);

const input = readline().split(" ");
const begin = input[0];
const interval = input[1];
const time = input[2];
const diff = time - begin;
print(!diff || (diff >= interval && diff % interval <= 1) ? "YES" : "NO");

var a=readline().split(' ');
var t=parseInt(a[0]);
var s=parseInt(a[1]);
var x=parseInt(a[2]);
x -= t;
if(x == 1 || x < 0){
	print("NO");
	quit();
};
if(x % s == 0 || x % s == 1) {
	print("YES");
} else {
	print("NO");
}
;

var line = readline().split(' ');

var t = parseInt(line[0]);
var s = parseInt(line[1]);
var x = parseInt(line[2]);
var f1 = (x-t)%s==0 && x>=t;
var f2 = (x-t-1)%s==0 && x>=(t+s+1);
if(f1 || f2) {
    print('YES');
}else{
    print('NO');
}

function rda(){ return readline().split(" ").map(Number); };
function rdn(){ return +readline(); };

var input = rda(), t = input[0], s = input[1], x = input[2];

var ans = "NO";
if(t == x){
    ans = "YES";
}else{
    if( ((x-t)%s == 0 || (x-t)%s == 1) && x-t != 0 && x-t != 1) ans = "YES";
}

write(ans);

var a=readline().split(' ');
var t=parseInt(a[0]);
var s=parseInt(a[1]);
var x=parseInt(a[2]);
x -= t;
if(x == 1){
	print("NO");
	quit();
};
if(x % s == 0 || x % s == 1) {
	print("YES");
} else {
	print("NO");
}
;

var line = readline().split(' ');

var t = parseInt(line[0]);
var s = parseInt(line[1]);
var x = parseInt(line[2]);
var f1 = (x-t)%s==0 && x>=t;
var f2 = (x-t-1)%s==1 && x>=(t+s+1);
if(f1 || f2) {
    print('YES');
}else{
    print('NO');
}


You are given a regular polygon with $$$n$$$ vertices labeled from $$$1$$$ to $$$n$$$ in counter-clockwise order. The triangulation of a given polygon is a set of triangles such that each vertex of each triangle is a vertex of the initial polygon, there is no pair of triangles such that their intersection has non-zero area, and the total area of all triangles is equal to the area of the given polygon. The weight of a triangulation is the sum of weigths of triangles it consists of, where the weight of a triagle is denoted as the product of labels of its vertices.Calculate the minimum weight among all triangulations of the polygon.

The first line contains single integer $$$n$$$ ($$$3 \le n \le 500$$$) — the number of vertices in the regular polygon.

Print one integer — the minimum weight among all triangulations of the given polygon.

NoteAccording to Wiki: polygon triangulation is the decomposition of a polygonal area (simple polygon) $$$P$$$ into a set of triangles, i. e., finding a set of triangles with pairwise non-intersecting interiors whose union is $$$P$$$.In the first example the polygon is a triangle, so we don't need to cut it further, so the answer is $$$1 \cdot 2 \cdot 3 = 6$$$.In the second example the polygon is a rectangle, so it should be divided into two triangles. It's optimal to cut it using diagonal $$$1-3$$$ so answer is $$$1 \cdot 2 \cdot 3 + 1 \cdot 3 \cdot 4 = 6 + 12 = 18$$$.

var n = readline();

var ans = 0;

for(var i=2; i<n; i++)
{
    ans += i* (i+1);
}

print(ans);

var n = readline();
var w=0;
for(var i=2; i<n; i++){
    w+=1*i*(i+1);
}
print(w);

(()=>{"use strict";var t={675:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),Array.numbersMatrix=(t,e,r)=>{let n=[];null==t&&(e=t),null==r&&(r=0);for(let i=0;i<t;++i){let t=[];for(let n=0;n<e;++n)t.push(r);n.push(t)}return n},Array.prototype.sortAsc=function(){return this.sort(((t,e)=>t-e))},Array.prototype.sortDesc=function(){return this.sort(((t,e)=>e-t))},Array.prototype.max=function(){if(0==this.length)return 0;let t=this[0];for(let e=1;e<this.length;++e)t=Math.max(t,this[e]);return t},Array.prototype.min=function(){if(0==this.length)return 0;let t=this[0];for(let e=1;e<this.length;++e)t=Math.min(t,this[e]);return t},Array.prototype.sum=function(){let t=0;for(let e=0;e<this.length;++e)t+=this[e];return t},Array.prototype.modSum=function(t){let e=0;for(let r=0;r<this.length;++r)e+=this[r],e%=t;return e},Array.prototype.avg=function(){return this.sum()/this.length},Array.prototype.groupBy=function(t){let e=new Map;for(let r=0;r<this.length;++r){const n=t(this[r]);e.has(n)?e.get(n).push(this[r]):e.set(n,[this[r]])}return e},Array.prototype.deepCopy=function(){let t=[];if(0==this.length)return t;let e=!1;Array.isArray(this[0])&&(e=!0);for(let r=0;r<this.length;++r)e?t.push(this[r].deepCopy()):t.push(this[r]);return t},Array.prototype.transpose=function(){let t=[];if(0==this.length)return[[]];for(let e=0;e<this[0].length;++e){let r=[];for(let t=0;t<this.length;++t)r.push(this[t][e]);t.push(r)}return t},Array.prototype.toString=function(){if(0==this.length)return"";if(!Array.isArray(this[0]))return this.join(" ");let t="";for(let e=0;e<this.length;++e)t+=this[e].join(" "),e!=this.length-1&&(t+="\n");return t}},312:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(r(747));let o="",s=[],u=0,l="";const p="local"===process.argv[2],a=t=>{if(p){if(s=i.default.readFileSync("input.txt").toString().trim().split("\n").map((t=>t.trim())),t(),i.default.writeFileSync("output.txt",l),console.log(l),i.default.readFileSync("expected.txt").toString().trim()==l.trim()){const{exec:t}=r(129);t("osascript -e 'display notification \"✅ AC!!\"'")}}else process.stdin.resume(),process.stdin.setEncoding("utf-8"),process.stdin.on("data",(t=>{o+=t})),process.stdin.on("end",(e=>{s=o.trim().split("\n").map((t=>t.trim())),t(),console.log(l)}))};function h(){return s[u++]}function f(){return h().split(" ").map((t=>parseFloat(t)))}function c(){return h().split("")}e.default={runMain:a,runEachTest:t=>{a((()=>{let[e]=f();for(;e>0;)t(),e--}))},readline:h,nextNumbers:f,nextBigNumbers:function(){return h().split(" ").map((t=>BigInt(t)))},nextNumbersMatrix:function(t){let e=[];for(let r=0;r<t;++r)e.push(f());return e},nextCharacters:c,nextCharacterMatrix:function(t){let e=[];for(let r=0;r<t;++r)e.push(c());return e},nextIntervalArray:function(t){let e=[];for(let r=0;r<t;++r){const[t,r]=f();e.push({a:t,b:r})}return e},put:function(t){l+=t},puts:function(t){l+=t+"\n"},debug:function(t){p&&console.log(t)}}},965:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),r(675);const i=n(r(312));i.default.runMain((function(){let[t]=i.default.nextNumbers(),e=0;for(let r=2;r<t;++r)e+=r*(r+1);i.default.puts(e)}))},129:t=>{t.exports=require("child_process")},747:t=>{t.exports=require("fs")}},e={};!function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}(965)})();

// Solution written in typescript and compiled via webpack. Original source code below
// Happy Hacking 😜

// import './array'
//
// import io from './io'
//
// function main() {
//   let [n] = io.nextNumbers()
//
//   let res = 0
//
//   for (let i = 2; i < n; ++i) {
//     res += i * (i + 1)
//   }
//
//   io.puts(res)
// }
//
// // io.runEachTest(main)
// io.runMain(main)

var n = readline();
var w=0;
var s = new Set();
for(var i=1; i<=n; i++){
    for(var j=1; j<i; j++){
        for(k=1; k<j; k++){
         if(!(s.has(i)&&s.has(j)&&s.has(k))){
                s.add(i);
                s.add(j);
                s.add(k);
                w+=i*j*k;
            }
        }
    }
}
print(w);


Vasya has n burles. One bottle of Ber-Cola costs a burles and one Bars bar costs b burles. He can buy any non-negative integer number of bottles of Ber-Cola and any non-negative integer number of Bars bars.Find out if it's possible to buy some amount of bottles of Ber-Cola and Bars bars and spend exactly n burles.In other words, you should find two non-negative integers x and y such that Vasya can buy x bottles of Ber-Cola and y Bars bars and x·a + y·b = n or tell that it's impossible.

First line contains single integer n (1 ≤ n ≤ 10 000 000) — amount of money, that Vasya has. Second line contains single integer a (1 ≤ a ≤ 10 000 000) — cost of one bottle of Ber-Cola. Third line contains single integer b (1 ≤ b ≤ 10 000 000) — cost of one Bars bar.

If Vasya can't buy Bars and Ber-Cola in such a way to spend exactly n burles print «NO» (without quotes). Otherwise in first line print «YES» (without quotes). In second line print two non-negative integers x and y — number of bottles of Ber-Cola and number of Bars bars Vasya should buy in order to spend exactly n burles, i.e. x·a + y·b = n. If there are multiple answers print any of them. Any of numbers x and y can be equal 0.

NoteIn first example Vasya can buy two bottles of Ber-Cola and one Bars bar. He will spend exactly 2·2 + 1·3 = 7 burles.In second example Vasya can spend exactly n burles multiple ways:   buy two bottles of Ber-Cola and five Bars bars;  buy four bottles of Ber-Cola and don't buy Bars bars;  don't buy Ber-Cola and buy 10 Bars bars. In third example it's impossible to but Ber-Cola and Bars bars in order to spend exactly n burles.

const readline = require('readline');

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
});

let state = 'n';
let n, a, b;
rl.on('line', (line) => {
  if (state == 'n') {
    n = parseInt(line);
    state = 'a';
  } else if (state == 'a') {
    a = parseInt(line);
    state = 'b';
  } else if (state == 'b') {
    b = parseInt(line);

    let max = n / a;
    let found = false;
    for (let i = 0; i <= max; i++) {
      let rest = n - i * a;
      if (rest % b == 0) {
        console.log('YES');
        console.log(i + ' ' + rest / b);
        found = true;
        break;
      }
    }
    if (!found) {
      console.log('NO');
    }
    state = 'n';
  }
}).on('close', () => {
  process.exit(0);
});

var a = parseInt(readline());
var b = parseInt(readline());
var c = parseInt(readline());
var d = Math.ceil(a / b);
var e = d * b;
var f = 0;
var g = 0;
var h = Math.floor(a / c);
while(true)
{
     if(e < a)
     {
          e = e + c;
          f++;
     }
     else if(e == a)
     {
          g = 1;
          break;
     }
     else if(e > a)
     {
          e = e - b;
          d--;
     }
     if((f > h) || (d < 0))
     {
          g = 2;
          break;
     }
}
if(g == 1)
{
     print('YES');
     var i = d + ' ' + f;
     print(i);

}
else if(g == 2)
{
     print('NO');
}

function gcd(a, b){
	if(!b){
		return a;
	}
	return gcd(b, a%b);
}
function e_gcd(a, b){
	if(a===0)
		return [0, 1];
	else{
		xy=e_gcd(b%a, a);
		return [xy[1]-Math.floor(b/a)*xy[0], xy[0]];
	}
}
var n=readline();
var a=parseInt(readline());
var b=parseInt(readline());
if(n%gcd(a, b)!==0){
	print("NO");
}
else{
	xy=e_gcd(a, b);
	x=xy[0];
	y=xy[1];
	x=x*n/gcd(a, b);
	y=y*n/gcd(a, b);
	if(x<0 && y>=0){
		var k=Math.ceil(Math.abs(x)*gcd(a, b)/b);
		x=x+k*b/gcd(a, b);
		y=y-k*a/gcd(a, b);
	}
	else{
		if(x>=0 && y<0){
			b = [a, a = b][0];
			y = [x, x = y][0];
			var k=Math.ceil(Math.abs(x)*gcd(a, b)/b);
			x=x+k*b/gcd(a, b);
			y=y-k*a/gcd(a, b);
			y = [x, x = y][0];
		}
	}
	if(x>=0 && y>=0){
		print("YES");
		print(x, y);
	}
	else{
		print("NO");
	}
}

var n = parseInt(readline());
var a = parseInt(readline());
var b = parseInt(readline());
var x = 0;
var y = 0;
var toPrint = 'NO';
if (a > b) {
    while (x <= n) {
        if ((n - x) % b === 0) {
            toPrint = 'YES\n' + Math.round(x / a) + ' ' + Math.round((n - x) / b);
            break;
        }
        x+=a;
    }
} else {
    while (y <= n) {
        if ((n - y) % a === 0) {
            toPrint = 'YES\n' + Math.round((n - y) / a) + ' ' + Math.round(y / b);
            break;
        }
        y+=b;
    }
}
print(toPrint);

//var print = require('./print');
//var readline = require('./readline');

var n = parseInt(readline());
var a = parseInt(readline());
var b = parseInt(readline());

for(var y = 0;;y++){
  var x = (n - b * y) / a;
  if(y * b > n){
    print('NO');
    break;
  }
  else if(x == parseInt(x) && a * x + b * y == n){
    print('YES');
    print(x + " " + y);
    break;
  }
  /*else {
    if(x * a + y * b >= n){
      print('NO');
      break;
    }
  }*/
}

/* A
var n = readline();
var res = '';
for (var i = 0; i < n.length - 2; i++)
  res += n[i];
if(n.length > 1){
  if(n[n.length - 1] > '5')
    res += parseInt(n[n.length - 2]) + 1;
  else {
    res += n[n.length - 2];
  }
}
res += '0';
print(res);
*/

var n = +readline();
var a = +readline();
var b = +readline();
var ans = 'NO';
for (var i=0; i <= Math.floor(n/a); i++){
    if ((n-a*i)%b == 0){
		ans = 'YES';
		print (ans);
		print (i, (n-a*i)/b);
		break;
	}
}
if (ans == 'NO') print('NO');

let n = 9960594;
let a = 2551;
let b = 2557;

const readline = require('readline');

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
});

let state = 'n';
rl.on('line', (line) => {
  if (state == 'n') {
    let n = parseInt(line);
    state = 'a';
  } else if (state == 'a') {
    let a = parseInt(line);
    state = 'b';
  } else if (state == 'b') {
    let b = parseInt(line);

    let max = n / a;
    let found = false;
    for (let i = 0; i <= max; i++) {
      let rest = n - i * a;
      if (rest % b == 0) {
        console.log('YES');
        console.log(i + ' ' + rest / b);
        found = true;
        break;
      }
    }
    if (!found) {
      console.log('NO');
    }
    state = 'n';
  }
}).on('close', () => {
  process.exit(0);
});

var n = readline();
var x = readline();
var y = readline();
var ok=0;
for(var i=0; i<1000007; i++){
	if(n-i*x>=0 && (n-i*x)%y===0){
		print("YES");
		print(i, (n-i*x)/y);
		ok=1;
		break;
	}
}
if(!ok){
	print("NO");
}

var n = +readline();
var a = +readline();
var b = +readline();
var ans = 'NO';
for (var i=0; i < Math.ceil(n/a); i++){
	if ((n-a*i)%b == 0){
		ans = 'YES';
		print (ans);
		print (i, (n-a*i)/b);
		break;
	}
}
if (ans == 'NO') print('NO');

var n = +readline();
var a = +readline();
var b = +readline();
var ans = 'NO';
for (var i=0; i <= Math.ceil(n/a); i++){
	if ((n-a*i)%b == 0){
		ans = 'YES';
		print (ans);
		print (i, (n-a*i)/b);
		break;
	}
}
if (ans == 'NO') print('NO');


You are given a string q. A sequence of k strings s1, s2, ..., sk is called beautiful, if the concatenation of these strings is string q (formally, s1 + s2 + ... + sk = q) and the first characters of these strings are distinct.Find any beautiful sequence of strings or determine that the beautiful sequence doesn't exist.

The first line contains a positive integer k (1 ≤ k ≤ 26) — the number of strings that should be in a beautiful sequence.  The second line contains string q, consisting of lowercase Latin letters. The length of the string is within range from 1 to 100, inclusive.

If such sequence doesn't exist, then print in a single line "NO" (without the quotes). Otherwise, print in the first line "YES" (without the quotes) and in the next k lines print the beautiful sequence of strings s1, s2, ..., sk. If there are multiple possible answers, print any of them.

NoteIn the second sample there are two possible answers: {"aaaca", "s"} and {"aaa", "cas"}.

function toi(x){return parseInt(x);}
n=toi(readline());
var s=readline();
var res="";
var dic={};
var num=0;
for(var i=0;i<s.length;i++){
    c=s[i];
    if(dic[c]==1){
	res+=c;
    }else{
	res+="\n";
	dic[c]=1;
	num++;
	if(num==n){
	    res+=s.substring(i);
	    break;
	}else{
	    res+=c;
	}
    }
}
if(num!=n){
    print("NO");
}else{
    print("YES"+res);
}

var k = parseInt( readline() ),
	s = readline(),
	ans = [],
	used = {};

for (var i = 0; i < s.length && ans.length < k; i++) {
	if (!used[s.charAt( i )]) {
		ans.push( i );
		used[s.charAt( i )] = true;
	}
}

if (k === ans.length) {
	print( 'YES' );
	ans.push( s.length );
	ans.forEach( function(p, i) {
		if (i > 0) {
			print( s.substring( ans[i-1], p ) );
		}
	} );
} else {
	print( 'NO' );
}

var k = parseInt( readline() ),
	s = readline(),
	ans = [],
	used = {};

for (var i = 0; i < s.length && ans.length < k; i++) {
	if (!used[s.charAt( i )]) {
		ans.push( i );
		used[s.charAt( i )] = true;
	}
}

if (k === ans.length) {
	print( 'YES' );
	ans.push( s.length );
	ans.forEach( function(p, i) {
		if (i > 0) {
			print( s.substring( ans[i-1], i ) );
		}
	} );
} else {
	print( 'NO' );
}


You have $$$n$$$ coins, each of the same value of $$$1$$$.Distribute them into packets such that any amount $$$x$$$ ($$$1 \leq x \leq n$$$) can be formed using some (possibly one or all) number of these packets.Each packet may only be used entirely or not used at all. No packet may be used more than once in the formation of the single $$$x$$$, however it may be reused for the formation of other $$$x$$$'s.Find the minimum number of packets in such a distribution.

The only line contains a single integer $$$n$$$ ($$$1 \leq n \leq 10^9$$$) — the number of coins you have.

Output a single integer — the minimum possible number of packets, satisfying the condition above.

NoteIn the first example, three packets with $$$1$$$, $$$2$$$ and $$$3$$$ coins can be made to get any amount $$$x$$$ ($$$1\leq x\leq 6$$$).  To get $$$1$$$ use the packet with $$$1$$$ coin.  To get $$$2$$$ use the packet with $$$2$$$ coins.  To get $$$3$$$ use the packet with $$$3$$$ coins.  To get $$$4$$$ use packets with $$$1$$$ and $$$3$$$ coins.  To get $$$5$$$ use packets with $$$2$$$ and $$$3$$$ coins  To get $$$6$$$ use all packets. In the second example, two packets with $$$1$$$ and $$$1$$$ coins can be made to get any amount $$$x$$$ ($$$1\leq x\leq 2$$$).

print(Math.ceil((-1 + Math.sqrt(1 + 8*+readline()))/2));


Year 2118. Androids are in mass production for decades now, and they do all the work for humans. But androids have to go to school to be able to solve creative tasks. Just like humans before.It turns out that high school struggles are not gone. If someone is not like others, he is bullied. Vasya-8800 is an economy-class android which is produced by a little-known company. His design is not perfect, his characteristics also could be better. So he is bullied by other androids.One of the popular pranks on Vasya is to force him to compare $$$x^y$$$ with $$$y^x$$$. Other androids can do it in milliseconds while Vasya's memory is too small to store such big numbers.Please help Vasya! Write a fast program to compare $$$x^y$$$ with $$$y^x$$$ for Vasya, maybe then other androids will respect him.

On the only line of input there are two integers $$$x$$$ and $$$y$$$ ($$$1 \le x, y \le 10^{9}$$$).

If $$$x^y < y^x$$$, then print '<' (without quotes). If $$$x^y > y^x$$$, then print '>' (without quotes). If $$$x^y = y^x$$$, then print '=' (without quotes).

NoteIn the first example $$$5^8 = 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 \cdot 5 = 390625$$$, and $$$8^5 = 8 \cdot 8 \cdot 8 \cdot 8 \cdot 8 = 32768$$$. So you should print '>'.In the second example $$$10^3 = 1000 < 3^{10} = 59049$$$.In the third example $$$6^6 = 46656 = 6^6$$$.

var l = readline().split(' ');
x = parseInt(l[0]);
y = parseInt(l[1]);

if(x < y){
    log = Math.log(y) / Math.log(x);
    py = log*x;
    px = y;
    if(px < py) print('<');
    else if(px > py) print('>');
    else print('=');
}
else if(x > y){
    log = Math.log(x) / Math.log(y);
    px = log*y;
    py = x;
    if(px < py) print('<');
    else if(px > py) print('>');
    else print('=');
}
else print('=');

var arr = readline().split(" ").map(function(x) { return parseInt(x); });

var a = arr[0]
var b = arr[1]

if(a == b) print("=")
else if(a >= 8 && b >= 8){
    if(a < b){
        print(">")
    }
    else print ("<")
}
else if(Math.pow(a,b) == Math.pow(b,a)){
    print("=")
}
else if(Math.pow(a,b) > Math.pow(b, a)){
    print(">")
}
else print("<")

var r = readline().split(' ');
var x = +r[0],
    y = +r[1];

var logxy = y * Math.log(x);
var logyx = x * Math.log(y);

if (Math.abs(logxy - logyx) < Number.EPSILON) {
    print('=');
}
else {
    print(logxy > logyx ? '>' : '<');
}

var aux = readline().split(" ").map(function(x) { return parseInt(x); });
print(solve(aux[0],aux[1]));
function solve(x,y)
{
    switch(true)
    {
        case x==y||(x==2&&y==4)||(x==4&&y==2):
            return '=';
        case x==1:
            return '<';
        case y==1:
            return '>';
    }
    var a=Math.log2(x)*y,b=Math.log2(y)*x;
    if(a<b)
        return '<';
    return '>';
}

  var tmp = readline().split(' ').map(x => parseInt(x));
  var x = tmp[0];
  var y = tmp[1];

  var res = [];
  for(var i = 1; i < 6; i += 1) {
    res[i] = [];
    for(var j = 1; j < 6; j += 1) {
      var a = Math.pow(i, j);
      var b = Math.pow(j, i);
      if(a === b) {
        res[i][j] = '=';
        continue;
      }
      if(a > b) {
        res[i][j] = '>';
        continue;
      }
      if(a < b) {
        res[i][j] = '<';
        continue;
      }
    }
  }
  if(x <= 5 && y <= 5) {
    print(res[x][y]);
  } else if(x > 5 && y > 5) {
    if(x === y) {
      print('=');
    } else if(x > y) {
      print('<');
    } else {
      print('>');
    }
  } else if(x > 5 && y <= 5) {
    if(y === 1) {
      print('>');
    } else {
      print('<');
    }
  } else {
    if(x === 1) {
      print('<');
    } else {
      print('>');
    }
  }

/**
 * Created by bhavyaagg on 09/06/18.
 */

const readline = require('readline');

r1 = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

r1.on('line', (data) => {
  let x = data.split(" ")[0];
  let y = data.split(" ")[1];

  if (x == y) {
    console.log("=");
  } else {
    if (x == 1) {
      console.log("<")
    }
    else if (y == 1) {
      console.log(">")
    }
    else {
      let a = y * Math.log(x) - x * Math.log(y);

      if (a == 0) {
        console.log("=")
      }
      else if (a < 0) {
        console.log("<")
      } else {
        console.log(">")
      }
    }
  }
  // else if (x < y) {
  //
  //   console.log(">")
  // } else {
  //   console.log("<")
  // }

  r1.close();
})

const readline = require('readline');

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

rl.question('', (answer) => {
  // TODO: Log the answer in a database
  let vals = answer.split(" ");
  if(Math.log(vals[0])/vals[0] === Math.log(vals[1])/vals[1]){
      console.log("=");
  }else if(Math.log(vals[0])/vals[0] > Math.log(vals[1])/vals[1]){
      console.log(">");
  }else {
      console.log("<");
  }
  rl.close();
});

var arr = readline().split(" ").map(function(x) { return parseInt(x); });

var a = arr[0]
var b = arr[1]

if(a == b) print("=")
else if(a >= 8 && b >= 8){
    if(a < b){
        print(">")
    }
    else print ("<")
}
else if(Math.pow(a,b) > Math.pow(b, a)){
    print(">")
}
else print("<")

var arr = readline().split(" ").map(function(x) { return parseInt(x); });

var a = arr[0]
var b = arr[1]

if(a == b) print("=")
else if(b * Math.log(a) > a * Math.log(b)){
    print(">")
}
else print("<")

var arr = readline().split(" ").map(function(x) { return parseInt(x); });

var a = arr[0]
var b = arr[1]

var log = Math.log
if(a == b) print("=")
else if(b * log(a) > a * log(b)){
    print(">")
}
else print("<")

var arr = readline().split(" ").map(function(x) { return parseInt(x); });

var a = arr[0]
var b = arr[1]

if(a == b) print("=")
else if(a >= 3 && b >= 3){
    if(a < b){
        print(">")
    }
    else print ("<")
}
else if(Math.pow(a,b) > Math.pow(b, a)){
    print(">")
}
else print("<")

var r = readline().split(' ');
var x = +r[0],
    y = +r[1];

if (x === y) {
    print('=');
}
else if (x > y) {
    print('<');
}
else {
    print('>');
}

var r = readline().split(' ');
var x = +r[0],
    y = +r[1];

var xy = Math.pow(x, y);
var yx = Math.pow(y, x);

if (xy === yx) {
    print('=');
}
else {
    print(xy > yx ? '>' : '<');
}

var r = readline().split(' ');
var x = r[0],
    y = r[1];

if (x === y) {
    print('=');
}
else if (x > y) {
    print('<');
}
else {
    print('>');
}

var r = readline().split(' ');
var x = +r[0],
    y = +r[1];

if (x === y) {
    print('=');
}
else {
    var res = Math.pow(x, y) > Math.pow(y, x) ? '>' : '<';
    print(res);
}

var r = readline().split(' ');
var x = +r[0],
    y = +r[1];

if (x === y) {
    print('=');
}
else if (x < 10 || y < 10) {
    var res = Math.pow(x, y) > Math.pow(y, x) ? '>' : '<';
    print(res);
}
else if (x > y) {
    print('<');
}
else {
    print('>');
}

function gcd(x, y) {
    while (x > 0) {
        var t = x;
        x = y % x;
        y = t;
    }
    return y;
}

var r = readline().split(' ');
var x = +r[0],
    y = +r[1];

var g = gcd(x, y);
var xd = x / g;
var yd = y / g;
var md = Math.min(xd, yd)

var xy = Math.pow(g, yd - md) * Math.pow(xd, yd);
var yx = Math.pow(g, xd - md) * Math.pow(yd, xd);

if (xy === yx) {
    print('=');
}
else {
    print(xy > yx ? '>' : '<');
}

var aux = readline().split(" ").map(function(x) { return parseInt(x); });
print(solve(aux[0],aux[1]));
function solve(x,y)
{
    switch(true)
    {
        case x==y||(x==2&&y==4)||(x==4&y==2):
            return '=';
        case x==1:
            return '<';
        case y=1:
            return '>';
    }
    var a=Math.log2(x)*y,b=Math.log2(y)*x;
    if(a<b)
        return '<';
    return '>';
}

var aux = readline().split(" ").map(function(x) { return parseInt(x); });
print(solve(aux[0],aux[1]));
function solve(x,y)
{
    switch(true)
    {
        case x==y||(x==2&&y==4)||(x==4&y==2):
            return '=';
        case x==1:
            return '<';
        case y==1:
            return '>';
    }
    var a=Math.log2(x)*y,b=Math.log2(y)*x;
    if(a<b)
        return '<';
    return '>';
}

  var tmp = readline().split(' ').map(x => parseInt(x));
  var x = tmp[0];
  var y = tmp[1];

  var res = [];
  for(var i = 1; i < 6; i += 1) {
    res[i] = [];
    for(var j = 1; j < 6; j += 1) {
      var a = Math.pow(i, j);
      var b = Math.pow(j, i);
      if(a === b) {
        res[i][j] = '=';
        continue;
      }
      if(a > b) {
        res[i][j] = '>';
        continue;
      }
      if(a < b) {
        res[i][j] = '<';
        continue;
      }
    }
  }
  if(x <= 5 && y <= 5) {
    print(res[x][y]);
  } else if(x > 5 && y > 5) {
    if(x === y) {
      print('=');
    } else if(x > y) {
      print('<');
    } else {
      print('>');
    }
  } else if(x > 5 && y <= 5) {
    print('<');
  } else {
    print('>');
  }

  var tmp = readline().split(' ').map(x => parseInt(x));
  var x = tmp[0];
  var y = tmp[1];
  var reverse = false;
  if(x > y) {
    reverse = true;
    var z = y;
    y = x;
    x = z;
  }
  var e = 2.71828;
  if(x === y ||
     (x === 2 && y == 4) ||
     (x === -2 && y == -4)) {
    print('=');
  } else if(x > e && y > e) {
    print(reverse ? '<' : '>');
  } else if(x < e && y < e) {
    print(reverse ? '>' : '<');
  } else {
    if(x == 1) {
      print(reverse ? '>' : '<');
    } else {
      print(reverse ? '<' : '>');
    }
  }

/**
 * Created by bhavyaagg on 09/06/18.
 */

const readline = require('readline');

r1 = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

r1.on('line', (data) => {
  let x = data.split(" ")[0];
  let y = data.split(" ")[1];

  if (x == y) {
    console.log("=");
  } else if (x < y) {
    console.log(">")
  } else {
    console.log("<")
  }

  r1.close();
})

/**
 * Created by bhavyaagg on 09/06/18.
 */

const readline = require('readline');

r1 = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

r1.on('line', (data) => {
  let x = data.split(" ")[0];
  let y = data.split(" ")[1];

  if (x == y) {
    console.log("=");
  } else {
    if (x == 1) {
      console.log(">")

    }
    else if (y == 1) {
      console.log(">")
    }
    else {
      let a = y * Math.log(x) - x * Math.log(y);

      if (a == 0) {
        console.log("=")
      }
      else if (a < 0) {
        console.log("<")
      } else {
        console.log(">")
      }
    }
  }
  // else if (x < y) {
  //
  //   console.log(">")
  // } else {
  //   console.log("<")
  // }

  r1.close();
})

/**
 * Created by bhavyaagg on 09/06/18.
 */

const readline = require('readline');

r1 = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

r1.on('line', (data) => {
  let x = data.split(" ")[0];
  let y = data.split(" ")[1];

  if (x == y) {
    console.log("=");
  } else {
    if(y*Math.log(x) < x * Math.log(x)){
      console.log("<")
    } else{
      console.log(">")
    }
  }
  // else if (x < y) {
  //
  //   console.log(">")
  // } else {
  //   console.log("<")
  // }

  r1.close();
})

/**
 * Created by bhavyaagg on 09/06/18.
 */

const readline = require('readline');

r1 = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

r1.on('line', (data) => {
  let x = data.split(" ")[0];
  let y = data.split(" ")[1];

  if (x == y) {
    console.log("=");
  } else {
    if(x==1){
      console.log(">")

    }
    else if(y==1){
      console.log(">")
    }
    else if(y*Math.log(x) < x * Math.log(x)){
      console.log("<")
    } else{
      console.log(">")
    }
  }
  // else if (x < y) {
  //
  //   console.log(">")
  // } else {
  //   console.log("<")
  // }

  r1.close();
})

/**
 * Created by bhavyaagg on 09/06/18.
 */

const readline = require('readline');

r1 = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

r1.on('line', (data) => {
  let x = data.split(" ")[0];
  let y = data.split(" ")[1];

  if (x == y) {
    console.log("=");
  } else if (x < y) {
    console.log("<")
  } else {
    console.log(">")
  }

  r1.close();
})

/**
 * Created by bhavyaagg on 09/06/18.
 */

const readline = require('readline');

r1 = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

r1.on('line', (data) => {
  let x = data.split(" ")[0];
  let y = data.split(" ")[1];

  if (x == y) {
    console.log("=");
  } else {
    if (x == 1) {
      console.log(">")

    }
    else if (y == 1) {
      console.log(">")
    }
    else {
      let a = y * Math.log(x) - x * Math.log(x);

      if (a == 0) {
        console.log("=")
      }
      else if (a < 0) {
        console.log("<")
      } else {
        console.log(">")
      }
    }
  }
  // else if (x < y) {
  //
  //   console.log(">")
  // } else {
  //   console.log("<")
  // }

  r1.close();
})