#define LOCAL
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;
using ll = long long;
using P = pair<int, int>;

#define REP(i, x) for (int i = 0; i < (int) (x); i++)
#define REPS(i, x) for (int i = 1; i <= (int) (x); i++)
#define RREP(i, x) for (int i = ((int) (x) -1); i >= 0; i--)
#define RREPS(i, x) for (int i = ((int) (x)); i > 0; i--)
#define ALL(x) ((x).begin(), (x).end())
#define SIZE(x) ((int) (x).size())
#define BITS(x) (1LL << (x))

constexpr int INF = 1001001001;
constexpr ll LINF = 1001001001001001001LL;
constexpr int MOD = 1000000007;
constexpr double EPS = 1e-10;
constexpr double PI = 3.141592653589793;
constexpr int dx4[4] = {1, 0, -1, 0};
constexpr int dy4[4] = {0, 1, 0, -1};
constexpr int dx8[8] = {1, 1, 1, 0, 0, -1, -1, -1};
constexpr int dy8[8] = {1, 0, -1, 1, -1, 1, 0, -1};

random_device seed_gen;
mt19937 mrand(seed_gen());
mt19937_64 mrand64(seed_gen());
int rand32(int x) {
	return mrand() % x;
}
ll rand64(long x) {
	return mrand64() % x;
}

template<typename A, typename B> ostream& operator<<(ostream& out, const pair<A, B>& a) {
	out << "(" << a.first << "," << a.second << ")";
	return out;
}
template<typename T, size_t N> ostream& operator<<(ostream& out, const array<T, N>& a) {
	out << "[";
	bool first = true;
	for (auto& v : a) {
		out << (first ? "" : ",");
		out << v;
		first = 0;
	}
	out << "]";
	return out;
}
template<typename T> ostream& operator<<(ostream& out, const vector<T>& a) {
	out << "[";
	bool first = true;
	for (auto& v : a) {
		out << (first ? "" : ",");
		out << v;
		first = 0;
	}
	out << "]";
	return out;
}
template<typename T, class Cmp> ostream& operator<<(ostream& out, const set<T, Cmp>& a) {
	out << "{";
	bool first = true;
	for (auto& v : a) {
		out << (first ? "" : ",");
		out << v;
		first = 0;
	}
	out << "}";
	return out;
}
template<typename U, typename T, class Cmp> ostream& operator<<(ostream& out, const map<U, T, Cmp>& a) {
	out << "{";
	bool first = true;
	for (auto& p : a) {
		out << (first ? "" : ",");
		out << p.first << ": " << p.second;
		first = 0;
	}
	out << "}";
	return out;
}
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif
template<typename Arg1> void __f(const char* name, Arg1&& arg1) {
	cerr << name << ": " << arg1 << endl;
}
template<typename Arg1, typename... Args> void __f(const char* names, Arg1&& arg1, Args&&... args) {
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << ": " << arg1 << " |";
	__f(comma + 1, args...);
}

struct fast_ios {
	static constexpr int IOS_PREC = 15;
	static constexpr bool AUTOFLUSH = false;

	fast_ios() {
		cin.tie(nullptr);
		ios::sync_with_stdio(false);
		cout << fixed << setprecision(IOS_PREC);
		if (AUTOFLUSH) cout << unitbuf;
	}
} fast_ios_;

vector<bool> flag(110);

int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int d;
		cin >> d;
		flag[d] = true;
	}
	int ans = 0;
	for (int i = 0; i < n; i++) {
		ans += flag[i];
	}
	cout << ans << endl;
	return 0;
}


// ABC 085 B- Kagami Mochi

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  // Kagami Mochi 配列
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  // 大きい順に並べる
  sort(vec.begin(), vec.end());
  reverse(vec.begin(), vec.end());

  // 同じ大きさがないか確認
  int count = 1;
  if (N == 1) {
    cout << count << endl;
  }
  else {
    for (int i = 0; i < N-1; i++) {
      if (vec.at(i) != vec.at(i+1)) {
        count++;
      }
    }
  }
  cout << count << endl;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  int N. num, count;
  cin >> N;

  vector<int> vec(N);

  for (int i=0; i<N+ i++) {
    cin >> vec.at(i);
  }

  sort(vec.begin(), vec.end()); //sort
  reverse(vec.begin(), vec.end());

  num = 0;
  count = 1;
  for (int i=0; i<N+ i++) {
    if (num == vec.at(i) {
      count++;
    }
    num = vec.at(i); // num に大きい方からvecを代入
  }
  cout << num << endl;

}


#include <stdio.h>
#include <stdlib.h>
int desc(const void *a, const void *b) {
  return *(int *)b - *(int *)a;
}

int main(void){
    int n,i,r=1,before;
    int arr[999];
    scanf("%d",&n);
    for(i=0;i<n;i++)scanf("%d",arr+i);
    printf(arr+i);
    qsort(arr,n,4,desc);
    before=arr[0];
    for(i=1;i<n;i++){
        if(before!=arr[i]){
            before=arr[i];
            r++;
        }
    }
    printf("%d\n",r);
    return 0;
}


#include<stdio.h>
int main()
{
    int n;
    scanf("%d", &n);
    int i;
    int d[102];
    for (i = 0; i < n; i++)
        scanf("%d", &d[i]);
    int k;
    for(i=0;i<n-1;i++)
        if (d[i] < d[i + 1])
        {
            k = d[i];
            d[i] = d[i + 1];
            d[i + 1] = k;
            if (i > 0)
                i -= 2;
        }
    int ans = n;
    for (i = 1; i < n; i++)
        if (d[i] == d[i - 1])
            ans--;
    printf("%d\n", ans);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define N 100

int compare(const void *a, const void *b)
{
    return *(int *)a - *(int *)b;
}

int main()
{
    int i, n, last, r = 0;
    int a[N];
    scanf("%d", &n);
    for (i = 0; i < n; ++i)
        scanf("%d", &a[i]);
    qsort(a, n, sizeof(int), compare);

    for (i = 0; i < n; i++)
    {
        if (i == 0)
            r++;
        else if (a[last] < a[i])
            r++;
        last = i;
    }
    printf("%d\n", r);
}


#include <stdio.h>

int main()
{
	int i, N, d, flag[100] = {}, sum = 0;
	scanf("%d", &N);
	for (i = 1; i <= N; i++) {
		scanf("%d", &d);
		if (flag[d] == 0) {
			sum++;
			flag[d] = 1;
		}
	}
	printf("%d\n", sum);
	fflush(stdout);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
#define _GLIBCXX_DEBUG

int main(){
    int N;
    cin>>N;
    vector<int> vec(N);
    rep(i,N){
        cin>>vec[i];
    }
    sort(vec.begin(),vec.end());
    reverse(vec.begin(),vec.end());

    int count=1;
    if(N==1) cout<<count<<endl;
    else
    {
        rep(i,N-1){
            if(vec[i+1]-vec[i]!=0) count++;
            else continue;
        }
        cout<<count<<endl;
    }

}


#include<stdio.h>
int main(void)
{
    int N;
    int d[100];
    int c = 0;
    scanf("%d", &N);
    for (int i = 0; i < N; i++)
    {
        scanf("%d", &d[i]);
        for (int j = 0; j < i; j++)
        {
            if(d[i] == d[j])
            {
                c++;
            }
        }

    }
    printf("%d\n", N - c);
    return 0;
}


function main(input){
  const args = input.split('\n');
  const N = args[0],
        nums = args.slice(1, args.length - 1);
  //filterによるindex番号と元の配列のindex番号が一致している場合のみを返す
  //そうすることで、重複している値を削除することができる
  var count = nums.filter(function(n,i,j){
    return j.indexOf(n) === i;
  }).length;
  console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
    const args = input.split(/\n/);
    const N = args[0],
          nums = args.slice(1, args.length - 1);

    console.log(nums.filter((n, i) => nums.indexOf(n) === i).length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
    const args = input.split('\n');
    const N = args[0],
	  nums = args.slice(1,args.length - 1);

    console.log(nums.filter((n,i) => nums.indexOf(n) === i).length);
}

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


function main(input) {
  //   const input = "4,10,8,8,6";
  const args = input.split("\n");
  console.log(args);
  const N = args[0],
    nums = args.slice(1, args.length - 1);

  console.log(Array.from(new Set(nums)).length);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input) {
  //   const input = "4,10,8,8,6";
  const args = input.split("/n");
  console.log(args);
  const N = args[0],
    nums = args.slice(1, args.length - 1);

  console.log(Array.from(new Set(nums)).length);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input) {
	const args = input.split('\n');
  	const N = parseInt(args[0], 10);
  	let arr = args.slice(1, args.length).map((n) => parseInt(n, 10));

  	const another_arr = [...new Set(arr)];

  	console.log(another_arr.length);
}

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


package main

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

var (
	reader io.Reader = os.Stdin
	writer io.Writer = os.Stdout
)

func main() {
	run()
}

func run() {
	scanner := bufio.NewScanner(reader)
	scanner.Scan()
	N, _ := strconv.Atoi(scanner.Text())

	nums := make([]int, 0, N)

	for scanner.Scan() {
		num, _ := strconv.Atoi(scanner.Text())
		nums = append(nums, num)
	}

	sort.Ints(nums)
	count := 1

	for i := 1; i < N; i++ {
		if nums[i] > nums[i-1] {
			count++
		}
	}

	fmt.Fprintln(writer, count)
}


package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	/*/TODO:!!!!!!!テスト用!!!!!!!!!
	sc = bufio.NewScanner(strings.NewReader(`

				`))
	//TODO:!!!!!!!テスト用!!!!!!!!!*/

	buf := make([]byte, 1024*1024)
	sc.Buffer(buf, bufio.MaxScanTokenSize)
	sc.Split(bufio.ScanWords)
	defer out.Flush() // !!!!caution!!!! you must use Fprint(out, ) not Print()
	/* --- code --- */
	//fmt.Fprintln(out, "[DEBUG]", time.Now())
	//https://atcoder.jp/contests/abc165/tasks/abc165_f
	//https://www.dropbox.com/sh/nx3tnilzqz7df8a/AAA0887IQFx5BcrZcrpRD7uga/ABC165/F?dl=0&subfolder_nav_tracking=1

	n := nextInt()
	d := nextInts(n)

	m := map[int]int{}

	for i := 0; i < n; i++ {
		m[d[i]] = 1
	}

	ans := len(m)

	//	fmt.Fprintln(out, "[DEBUG]]", a)
	fmt.Fprintln(out, ans)
}

//------------------------------------------------------------------------------

// -*-*-*-*-*-*-*-*-
// * I/O utilities *
// -*-*-*-*-*-*-*-*-

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

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

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

func nextInts(n int) []int {
	ret := make([]int, n)
	for i := 0; i < n; i++ {
		ret[i] = nextInt()
	}
	return ret
}
func nextFloats(n int) []float64 {
	ret := make([]float64, n)
	for i := 0; i < n; i++ {
		ret[i] = nextFloat64()
	}
	return ret
}
func nextStrings(n int) []string {
	ret := make([]string, n)
	for i := 0; i < n; i++ {
		ret[i] = next()
	}
	return ret
}

func chars(s string) []string {
	ret := make([]string, len([]rune(s)))
	for i, v := range []rune(s) {
		ret[i] = string(v)
	}
	return ret
}


package main

import (
	"fmt"
	"sort"
)

func main() {
	var N int
	var a, b []int

	fmt.Scan(&N)
	for i:=0;i<N;i++ {
		var x int
		fmt.Scan(&x)
		a = append(a, x)
	}

	sort.Sort(sort.IntSlice(a))
	b = append(b, a[0])
	for _, v := range a {
		if b[len(b) - 1] < v {
			b = append(b, v)
		}
	}

	fmt.Print(len(b))
}


package main

import (
	"fmt"
)

func removeDuplicated(args []int) []int {
	results := make([]int. 0, len(args))
	encountered := map[int]bool{}
	for i:=0; i<len(args); i++ {
		if !encountered[args[i]] {
			encountered[args[i]] = true
			results = append(results, args[i])
		}
	}
	return results
}

func main(){
	var n int
	fmt.Scan(&n)
	d := make([]int, n)
	for i := 0; i<n; i++ {
		fmt.Scan(&d[i])
	}

	b := removeDuplicated(d)
	fmt.Println(len(b))
}


package main

import (
    "fmt"
    "sort"
)

func main() {
	var n int
	fmt.Scan(&n)
	mochi := make([]int, n)

	for i := 0; i < n; i++ {
		fmt.Scan(&mochi[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(mochi)))

	count := 1
	for i := 1; i<n; i++ {
		if mochi[i] == mochi[i-1]
			continue
		}
		count++
	}
	fmt.Println(count)
}


package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
)

const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		sc.Split(bufio.ScanWords)
		return sc
	}()
)

func main() {
	N := getInt()
	d := getIntArray(N)

	sort.Sort(sort.Reverse(sort.IntSlice(d)))

	fmt.Println(d)

	result := 0
	for i := 0; i < N; i++ {
		if i == 0 {
			result++
			continue
		}

		if d[i] < d[i-1] {
			result++
		}
	}
	fmt.Println(result)
}

type Graph struct {
	n     int
	edges [][]int
}

func NewGraph(n int) *Graph {
	g := &Graph{
		n:     n,
		edges: make([][]int, n),
	}
	return g
}

func (g *Graph) AddEdge(u, v int) {
	g.edges[v] = append(g.edges[v], u)
	g.edges[u] = append(g.edges[u], v)
}

func dfs(c int, edges [][]int, visited map[int]struct{}) {
	visited[c] = struct{}{}

	for _, v := range edges[c] {
		_, flag := visited[v]
		if flag {
			continue
		}
		dfs(v, edges, visited)
	}
}

func bfs(c int, graph *Graph) {
	next := make([]int, 0)
	next = append(next, c)
	visited := make(map[int]struct{})

	for ; len(next) != 0; {
		u := next[0]
		next = next[1:]
		visited[u] = struct{}{}

		for _, v := range graph.edges[u] {
			_, flag := visited[v]
			if flag {
				continue
			}

			// なにか処理

			next = append(next, v)
		}
	}
}

func getInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func getIntArray(n int) []int {
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = getInt()
	}
	return array
}

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

func getStringArray(n int) []string {
	array := make([]string, n)
	for i := 0; i < n; i++ {
		array[i] = getString()
	}
	return array
}

func abs(a int) int {
	return int(math.Abs(float64(a)))
}

func pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func powMod(n, p int) int {
	if p == 0 {
		return 1
	} else if p%2 == 0 {
		t := powMod(n, p/2)
		return calcMod(t * t)
	} else {
		return calcMod(n * powMod(n, p-1))
	}
}

func min(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton min() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Min(float64(res), float64(nums[i])))
	}
	return res
}

func max(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton max() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Max(float64(res), float64(nums[i])))
	}
	return res
}

func strSearch(a []string, b string) bool {
	for i := 0; i < len(a); i++ {
		if a[i] == b {
			return true
		}
	}
	return false
}

func printIntArray(array []int) {
	strArray := fmt.Sprint(array)
	fmt.Println(strArray[1 : len(strArray)-1])
}

func calcMod(x int) int {
	return x % mod
}

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

func isPrime(n int) bool {
	if n < 2 {
		return false
	} else if n == 2 {
		return true
	} else if n % 2 == 0 {
		return false
	}

	sqrtN := int(math.Sqrt(float64(n)))
	for i := 3; i <= sqrtN; i += 2 {
		if n % i == 0 {
			return false
		}
	}

	return true
}

func contains(s []int, e int) bool {
	for _, v := range s {
		if e == v {
			return true
		}
	}
	return false
}

func makeRange(min, max int) []int {
	a := make([]int, max-min+1)
	for i := range a {
		a[i] = min + i
	}
	return a
}

func powerset2(nums []int) [][]int {
	length := int(math.Pow(2, float64(len(nums))))
	result := make([][]int, length)

	index := 0
	result[index] = []int{}
	index++

	for _, n := range nums {
		max := index
		for i := 0; i < max; i++ {
			result[index] = copyAndAppend(result[i], n)
			index++
		}
	}

	return result
}

func copyAndAppend(nums []int, n int) []int {
	dst := make([]int, len(nums)+1)
	copy(dst, nums)
	dst[len(nums)] = n
	return dst
}

func calcGcd(x, y int) int {
	if y == 0 {
		return x
	} else if x >= y {
		return calcGcd(y, x % y)
	} else {
		return calcGcd(x, y % x)
	}
}

func getDivisor(n int) []int {
	var divisor []int
	divisor = append(divisor, 1)
	if n != 1 {
		divisor = append(divisor, n)
	}

	sqrt := int(math.Sqrt(float64(n)))
	for i := 2; i <= sqrt; i++ {
		if n % i == 0 {
			divisor = append(divisor, i)
			divisor = append(divisor, n/i)
		}
	}
	return divisor
}

type intHeap []int

func (h intHeap) Len() int {
	return len(h)
}

func (h intHeap) Less(i, j int) bool {
	return h[i] > h[j]
}

func (h intHeap) Swap(i, j int) {
	h[i], h[j] = h[j], h[i]
}

func (h *intHeap) Push(x interface{}) {
	*h = append(*h, x.(int))
}

func (h *intHeap) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

func initHeap() *intHeap {
	ih := &intHeap{}
	heap.Init(ih)
	return ih
}

func (h *intHeap) pushHeap(n int) {
	heap.Push(h, n)
}

func (h *intHeap) popHeap() int {
	return heap.Pop(h).(int)
}

func factMod(n int) int {
	value := 1
	for ; n > 1; n-- {
		value = calcMod(value * n)
	}
	return value
}

func combinationMod(n, k int) int {
	factN := factMod(n)
	factK := factMod(k)
	factNK := factMod(n - k)
	factKR := powMod(factK, mod - 2)
	factNKR := powMod(factNK, mod - 2)
	return calcMod(factN * calcMod(factKR * factNKR))
}


n=gets.chomp.to_i
d=Array.new
for i in 0..n-1
  d[i]=gets.chomp.to_i
end

puts d.uniq.size


puts (gets.to_i).times.map{gets.to_i}.uniq.size


n = gets.to_i
d = []
n.times do |_i|
  d.push(gets.to_i)
end
puts d.uniq.size


arr = gets.strip.split.map(&:to_i).uniq

puts arr.length


lines = readlines.map(&:chomp).uniq!
p lines.size


arr = gets.chomp.map(&:to_i)
arr.delete(1)
answer = arr.unique.count
puts answer


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

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

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

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

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

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

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

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

use std::collections::HashSet;
fn main() {
    input! {
        n: u32,
        d: [u32; n],
    };
    println!("{}", d.iter().collect::<HashSet<_>>().len());
}


use std::io::stdin;
use std::vec::Vec;

mod utils {
    use std::io::BufRead;
    use std::str::{self, FromStr};

    pub struct StdinReader<R: BufRead> {
        reader: R,
        buf: Vec<u8>,
    }

    impl<R: BufRead> StdinReader<R> {
        pub fn new(reader: R) -> StdinReader<R> {
            StdinReader {
                reader: reader,
                buf: Vec::new(),
            }
        }

        #[allow(unused)]
        #[inline]
        pub fn reads<T: FromStr>(&mut self) -> T {
            self.read_until(b' ')
        }

        #[allow(unused)]
        #[inline]
        pub fn readl<T: FromStr>(&mut self) -> T {
            self.read_until(b'\n')
        }

        #[allow(unused)]
        #[inline]
        pub fn read_vec<T: FromStr>(&mut self) -> Vec<T> {
            return self.read_until::<String>(b'\n').trim().split_whitespace().map(|c| c.parse().ok().unwrap()).collect();
        }

        #[inline]
        pub fn read_until<T: FromStr>(&mut self, delim: u8) -> T {
            loop {
                self.buf.clear();
                let len = self.reader
                    .read_until(delim, &mut self.buf)
                    .expect("failed reading bytes");
                match len {
                    0 => panic!("early eof"),
                    1 if self.buf[0] == delim => (),
                    _ => {
                        if self.buf[len - 1] == delim {
                            self.buf.truncate(len - 1);
                        }
                        break;
                    }
                }
            }

            let elem = unsafe { str::from_utf8_unchecked(&self.buf) };
            elem.parse().unwrap_or_else(|_| panic!(format!("failed parsing: {}", elem)))
         }
    }
}

fn main(){
    let stdin = stdin();
    let mut r = utils::StdinReader::new(stdin.lock());
    let n:usize = r.readl();
    let mut ds = vec![];
    for i in 0..n {
        let tar:i16 = r.readl();
        ds.push(tar);
    }

    ds.sort();

    let mut pre_d = 0;

    let mut res = 0;

    for d in ds {
        if(pre_d == d) {

        }else{
            res += 1;
        }
        pre_d = d;
    }
    println!("{}",res);
}


use std::collections::HashSet;
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

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

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

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

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

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

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

fn main() {
    input!(
    n: usize,
    a: [i32; n],
    );
    let mut a = a;
    a.sort();
    let uniq: HashSet<i32> = a.into_iter().collect();
    println!("{:?}", uniq.len());
}


use proconio::{fastout, input};

#[fastout]

fn main() {
    input! {
        n : i32,
        mut v : [[i32]; n],
    }
    v.sort();
    v.dedup();
    println!("{}", v.len())
}


use proconio::{input, fastout};

#[fastout]
fn main() {
    input! {
        n: u8,
        d: [u8; n],
    }
    println!("{}", d.iter().collect::<HashSet<_>>().len());
}


use proconio::{input, fastout};

#[fastout]
fn main() {
    input! {
        n: u8,
        d: [u8; n],
    }
    d.sort();
    d.dedup();
    println!("{}", d.len());
}


let n=Int(readLine()!)!
var arr:[Int]=[]
for _ in 0..<n {
	arr.append(Int(readLine()!)!)
}
#if swift(>=3.0)
arr=arr.sorted()
#else
arr=arr.sort()
#endif
var r=1
var t=arr[0]
for i in 1..<n {
	if t != arr[i] {
		t=arr[i]
		r+=1
	}
}
print(r)


import Foundation

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

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

//var min, min2, count: Int!
//for i in 1...10 {
//    let x = Int(readLine()!)!
//    if i == 1 {
//        min = x
//        count = 1
//    } else if x < min {
//        min2 = min
//        min = x
//        count = 1
//    } else if x == min && count == 1 {
//        min2 = x
//        count = 2
//    }
//}
//print(min2)

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

let N = readInt()!
var mochi = [Int]()
for _ in 0..<N {
    let d = readInt()!
    if !mochi.contains(d) {
        mochi += [d]
    }
}
print(mochi.count)


var n = Int(readLine()!)!
var dn: Set<Int> = []
while n > 0 {
  n -= 1
  dn.insert(Int(readLine()!)!)
}
print(dn.count)


//
//  main.swift
//  AtCoderSwift
//
//  Created by burita083 on 2020/08/25.
//  Copyright © 2020 burita083. All rights reserved.
//

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

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

func readTwoInts() -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: " ").map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

func abc080_b() {
    let N = readLine()!
    let sum = N.map { Int(String($0))! }.reduce(0, +)
    print(Int(N)! % sum == 0 ? "Yes" : "No")
}

//abc080_b()

func abc078_b() {
    let input = readInts()
    var X = input[0]
    let Y = input[1]
    let Z = input[2]
    var ans = 0
    X -= Y+Z*2
    ans += 1
    ans += X/(Y+Z)

    print(ans)
}

func abc085_b() {
    let N = readInt()
    var l: [Int] = []
    for _ in 0..<N {
        let d = readInt()
        l.append(d)
    }
    l.sort {$0 > $1 }
    var ans = 0
    for i in 0..<l.count-1 {
        if l[i] < l[i+1] {
            ans += 0
        } else {
            break
        }
    }
    print(ans)
}

abc085_b()


var n = Int(readLine())!
var dn: Set<Int> = []
while n == 0 {
  n -= 1
    dn.insert(Int(readLine())!)
}
print(dn.count)


7
50
30
50
100
50
80
30


s=require('fs').readFileSync('/dev/stdin','utf8').split('\n')
s.shift()
console.log(s.filter((n,i,e)=>e.indexOf(n)==i).length-1)


const main = (input) => {
    const args = input.split('\n');
    const N = args[0],
          nums = args.slice(1, args.length - 1);

    console.log(nums.filter((n, i) => nums.indexOf(n) === i).length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


s=require('fs').readFileSync('/dev/stdin','utf8').split('\n')
N = s[0]
nums = s.slice(1, s.length - 1);
console.log(nums.filter((n, i) => nums.indexOf(n) === i).length);


function main(input) {
  //   const input = "4,10,8,8,6";
  const args = input.split("/n");
  console.log(args);
  const N = args[0],
    nums = args.slice(1, args.length - 1);

  console.log(Array.from(new Set(nums)).length);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


s=require('fs').readFileSync('/dev/stdin','utf8').split('\n').map(n=>n|0)
s.shift()
console.log(s.filter((n,i,e)=>e.indexOf(n)==i).length)


s=require('fs').readFileSync('/dev/stdin','utf8').split('\n')
s.shift()
console.log(s.sort((a,b)=>a-b).filter((n,i,e)=>e.indexOf(n)==i).length)


a,b,c=map(int,input().split())
k=int(input())
num=0
while a>=b:
    b*=2
    num+=1
    if b>a:
        break
while b>=c:
    c*=2
    num+=1
    if c>b:
        break
if num<=k:
    print("Yes")
else:
    print("No")


a,b,c=map(int,input('').split())
k=int(input())
for i in range(k):
    if a<b and b<c:
        print("Yes")
        exit()
    if b<=a:
        b*=2
        continue
    if c<=b:
        c*=2
        continue
if a<b and b<c:
    print("Yes")
else:
    print('No')


a, b, c = map(int, input().split())
k = int(input())
cnt = 0
while a >= b:
    b = b * 2
    cnt += 1
while b >= c:
    c = c * 2
    cnt += 1
if k >= cnt:
    print("Yes")
else:
    print("No")


A,B,C=map(int,input().split())
K=int(input())

for i in range(K):
    if A>B:
        B=2*B
    elif B>C:
        C=2*C
    if A<B and B<C:
        print('Yes')
        break
else:
    print('No')


A,B,C = map(int,input().split())
x = [0,0,0]
K = int(input())
flag = 0
for i in range(K+1):
    for j in range(K+1-i):
        a = A*(2**i)
        b = B*(2**j)
        c = C*(2**(K-i-j))
        if c>b>a:
            print("Yes")
            flag = 1
            break
if flag == 0:
    print("No")


a,b,c = map(int,input().split())
k = int(input())
d = 0
for i in range(k+1):
    if b < a:
        b *= 2
    elif c < b:
        c *= 2
    else:
        d = 1
if d == 0:
    print("No")
else:
    print("Yes")


import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        FastScanner sc = new FastScanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int cnt = sc.nextInt();
        while(cnt > 0 && a >= b){
            b *= 2;
            cnt--;
        }
        while(cnt > 0 && b >= c){
            c *= 2;
            cnt--;
        }
        pw.println(a < b && b < c ? "Yes" : "No");
        pw.flush();
    }
}

class FastScanner {
    private BufferedReader reader = null;
    private StringTokenizer tokenizer = null;
    public FastScanner(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
        tokenizer = null;
    }

    public String next() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken("\n");
    }

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

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

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

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

    public long[] nextLongArray(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nextLong();
        return a;
    }
}


import java.util.*;
import java.io.*;
import static java.lang.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		// 入力
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int k = sc.nextInt();

		// 計算
		String result = "No";
		for(int i = 0; i < k; i++){
		    if(a >= b){
		        b *= 2;
		    }else if(b >= c){
		        c *= 2;
		    }
		}
		if(a < b && b < c) result = "Yes";

		// 出力
		System.out.println(result);
	}

	public static class Scanner {
		private BufferedReader br; private StringTokenizer tok;
		public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}
		private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}
		private boolean hasNext() { return tok != null && tok.hasMoreTokens();}
		public String next() throws IOException { getLine(); return tok.nextToken();}
		public int nextInt() throws IOException { return Integer.parseInt(next());}
		public long nextLong() throws IOException { return Long.parseLong(next());}
		public double nextDouble() throws IOException { return Double.parseDouble(next());}
	}
}


import java.util.*;
import java.io.*;

public class Main {
	private static void solve(){
		//Implement solution here.
		int A = ni();
		int B = ni();
		int C = ni();
		int K = ni();

		int cnt = 0;
		while(A >= B) {
			B *= 2;
			cnt ++;
		}
		while(B >= C) {
			C *= 2;
			cnt ++;
		}

		if(cnt > K) {
			System.out.println("No");
		} else {
			System.out.println("Yes");
		}
	}

	//Switch input source (stdin/file)
	private static BufferedReader br;
	public static void main(String[] args){
		br = new BufferedReader(new InputStreamReader(System.in));
		String debugDataPath = System.getenv("DD_PATH");
		if(debugDataPath != null){
			try{
				br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
		boolean hasNext = true;
		while(hasNext){
			solve();
			try{
				br.mark(1);
				if(br.read() > 0){
					br.reset();
					System.out.println("---");
				} else {
					hasNext = false;
				}
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
	}

	//Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	//Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
	//Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
	//Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
	//Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
	//Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
}


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		sc.nextLine();
		int k = sc.nextInt();

		boolean canDo = false;
		for (int i = 0; i < k; i++) {
			if (a >= b) {
				b = b*2;
				if (a < b && b < c) {
					canDo = true;
					break;
				}
			} else if (b >= c) {
				c = c*2;
				if (a < b && b < c) {
					canDo = true;
					break;
				}
			}
		}
		String ans = canDo ? "Yes" : "No";
		System.out.println(ans);
	}
}


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		sc.nextLine();
		int k = sc.nextInt();

		boolean canDo = false;
		for (int i = 0; i < k; i++) {
			if (a >= b) {
				b = b*2;
			} else if (b >= c) {
				c = c*2;
			} else {
				canDo = true;
				break;
			}
		}
		String ans = canDo ? "Yes" : "No";
		System.out.println(ans);
	}
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int k = sc.nextInt();

		for(int i=1;i<=k;i++) {
			if(a>b) {
				b*=2;
			}
			else {
				c*=2;
			}
		}
		if(c>b && b>a) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}

}


// warm heart, wagging tail,and a smile just for you!
//                                                                     ███████████
//                                                                   ███╬╬╬╬╬╬╬╬╬╬███
//                                                                ███╬╬╬╬╬████╬╬╬╬╬╬███
//                                            ███████████       ██╬╬╬╬╬████╬╬████╬╬╬╬╬██
//                                      █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██
//                               ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██
//                             ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██
//                           ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████
//                         ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██
//                       ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███
//                     ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██
//                 ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████
//     █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████
//   ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████
//   ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██
//       ██████████████  ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████
//                         ███████                           █████  ███████████████████
//
#include "bits/stdc++.h"
using namespace std;
#define INF (1<<30)
#define LINF (1LL<<60)
#define fs first
#define sc second
#define int long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FOR2(i,a,b) for(int i=(a);i<=(b);++i)
#define RFOR(i,a,b) for(int i = (b-1);i>=(a);--i)
#define RFOR2(i,a,b) for(int i = (b);i>=(a);--i)
#define REP(i,n)  FOR(i,0,(n))
#define REP2(i,n)  FOR2(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))
#define RREP2(i,n) RFOR2(i,0,(n))
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr,mp) for(auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x)  cout << #x << " = " << (x) << endl
#define SP << " " <<
template<typename T1,typename T2> inline bool chmin(T1 &a,T2 b){if(a>b) {a=b; return true;} else return false;}
template<typename T1,typename T2> inline bool chmax(T1 &a,T2 b){if(a<b) {a=b; return true;} else return false;}
#define MSB(x) (63-__builtin_clzll(x))
#define pcnt(x) (__builtin_popcountll(x))
#define parity(i,j) (i&(1LL<<j))
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vec;
typedef vector<vector<int>> mat;

void solve(){
  int A,B,C,K;
  cin >> A >> B >> C >> K;

  int cnt = 1;
  REP(_,K) cnt *= 3;
  REP(i,cnt){
    int x = A, y = B, z = C, now = i;
    REP(j,K){
      if(now%3==0) x *= 2;
      if(now%3==1) y *= 2;
      if(now%3==2) z *= 2;
      now /= 3;
    }
    if(x < y && y < z){
      cout << "Yes" << endl;
      return;
    }
  }
  cout << "No" << endl;
}

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

  int T = 1;
  // cin >> T;

  while(T--) solve();

  return 0;
}


#include<bits/stdc++.h>

int main(){
    using namespace std;
    unsigned long A, B, C, K;
    cin >> A >> B >> C >> K;
    while(A >= B){
        --K;
        B <<= 1;
    }
    while(B >= C){
        --K;
        C <<= 1;
    }
    puts(K > 10 ? "No" : "Yes");
    return 0;
}


#include<cstdio>

int main(){
    int a,b,c,k;
    scanf("%d %d %d %d", &a,&b,&c,&k);
    int i=0;
    while(i<=k+1){
        if(a>=b){
            b *= 2;
            i++;
        }
        else if(b>=c){
            c *= 2;
            i++;
        }
        else break;
    }
    if(i<=k) printf("Yes");
    else printf("No");
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i, ss, ee) for (int i = (ss); i <= (ee); ++i)

void solve() {
  int A, B, C, K;
  cin >> A >> B >> C >> K;
  rep(a, 0, K) {
    rep(b, 0, K) {
      rep(c, 0, K) {
        if (a + b + c != K) continue;
        int x, y, z;
        x = A * ((a != 0) ? a * 2 : 1);
        y = B * ((b != 0) ? b * 2 : 1);
        z = C * ((c != 0) ? c * 2 : 1);
        if (x < y && y < z) {
          cout << "Yes" << endl;
          // cout << x << y << z << endl;
          return;
        }
      }
    }
  }
  cout << "No" << endl;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i, ss, ee) for (int i = (ss); i <= (ee); ++i)

void solve() {
  int A, B, C, K;
  cin >> A >> B >> C >> K;
  rep(a, 0, K) {
    rep(b, 0, K) {
      rep(c, 0, K) {
        if (a + b + c != K) continue;
        int x, y, z;
        x = A * ((a) ? a * 2 : 1);
        y = B * ((b) ? b * 2 : 1);
        z = C * ((c) ? c * 2 : 1);
        if (x < y && y < z) {
          cout << "Yes" << endl;
          return;
        }
      }
    }
  }
  cout << "No" << endl;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i, ss, ee) for (int i = (ss); i < (ee); ++i)

void solve() {
  int A, B, C, K;
  cin >> A >> B >> C >> K;
  rep(a, 0, K) {
    rep(b, 0, K) {
      rep(c, 0, K) {
        int x, y, z;
        x = A * ((a) ? a * 2 : 1);
        y = B * ((b) ? b * 2 : 1);
        z = C * ((c) ? c * 2 : 1);
        if ((a + b + c == K) && x < y && y < z) {
          cout << "Yes" << endl;;
          return;
        }
      }
    }
  }
  cout << "No" << endl;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
}


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>

#define SIZE 100005
#define PI acosl(-1) //3.14159265358979323846264338327950L
#define rep(i, N) for (i = 0; i < N; i++) //制御変数iを用いてN回転
#define array(N, t) (t*)calloc(N, sizeof(t)) //t型N要素の1次元配列を動的確保後0クリア(freeを忘れずに)
#define zero(a); {int iter; rep(iter, sizeof(a)/sizeof((a)[0])) (a)[iter]=0;} //1次元配列aのゼロ初期化?
#define Sort(a, t) qsort(a, sizeof(a)/sizeof((a)[0]), sizeof(t), comp) //compを使って1次元配列をソート

typedef long long ll; typedef long double ld;
typedef struct node { int data; struct node *next; } Node;

Node *list[SIZE];
int queue[SIZE]; int q_head = 0, q_tail = 0;

void print_log(); //とりあえず文字を出力してどこまで実行できているか確認(for debug)
void printa_int(int *a, int size); //int型の1次元配列aを出力(for debug)
void printl_int(int size); //リンクリストを出力(for debug)
int comp(const void *a, const void *b); //昇順並び替えに使う比較関数
Node* add_node(int i, int data); void free_list(Node* head);
int queue_empty(); int queue_full();
void enqueue(int data); int dequeue();
ll* factorize(ll N); //Nを素因数分解、得られる配列は素因数,指数,素因数,…となっている(添字はintで指定する必要あり?)
void check_factorization(ll *fact); //素因数分解を表示(for debug)

int main() {
    int A, B, C, K, count = 0;
    scanf("%d %d %d %d", &A, &B, &C, &K);
    while (A >= B) {
        B *= 2;
        count++;
    }
    while (B >= C) {
        C *= 2;
        count++;
    }
    if (count <= K) printf("Yes\n");
    else printf("No\n");
    return 0;
}

void print_log() {
    printf("=== print log ===\n");
}
void printa_int(int *a, int size) {
    int i;
    printf("[");
    for (i = 0; i < size; i++)
        printf("%d, ", a[i]);
    printf("]\n");
}
void printl_int(int size) {
    int i;
    Node *t;
    rep(i, size) {
        printf("[%d] ", i);
        for (t = list[i]; t; t = t->next) printf("%d, ", t->data);
        printf("\n");
    }
}
int comp(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}
Node* add_node(int i, int data) {
    if (!list[i]) {
        list[i] = (Node*)malloc(sizeof(Node*));
        list[i]->data = data;
    } else {
        Node *t;
        t = list[i];
        list[i] = (Node*)malloc(sizeof(Node*));
        list[i]->data = data;
        list[i]->next = t;
    }
    return list[i];
}
void free_list(Node* head) {
    Node *prev = NULL, *t = head;
    while (t) {
        prev = t;
        t = t->next;
        free(prev);
    }
}
int queue_empty() {
    return q_head == q_tail;
}
int queue_full() {
    return (q_head - 1) % SIZE == q_tail % SIZE;
}
void enqueue(int data) {
    if (queue_full()) {
        printf("full!\n");
        return;
    }
    queue[q_tail++] = data;
    q_tail %= SIZE;
}
int dequeue() {
    if (queue_empty()) {
        printf("empty!\n");
        return -444444;
    }
    int data = queue[q_head++];
    q_head %= SIZE;
    return data;
}
ll* factorize(ll N) {
    ll *res = array(((sqrt(N) + 1) * 2), ll);
    ll i, x = N;
    int count = 0;
    for (i = 2; i * i <= N; i++) {
        ll e = 0;
        while (x % i == 0) {
            x /= i;
            e++;
        }
        if (e > 0) {
            res[count * 2] = i;
            res[count * 2 + 1] = e;
            count++;
        }
    }
    if (x > 1) {
        res[count * 2] = x;
        res[count * 2 + 1] = 1;
    }
    return res;
}
void check_factorization(ll *fact) {
    int i = 1;
    printf("%lld^%lld", fact[0], fact[1]);
    while (fact[i * 2] > 0) {
        printf(" * %lld^%lld", fact[i * 2], fact[i * 2 + 1]);
        i++;
    }
    printf("\n");
}


#include <stdio.h>
#include <stdlib.h>

typedef long long ll;

int main(void){
    ll A,B,C,K;
    scanf("%lld %lld %lld",&A,&B,&C);
    scanf("%lld",&K);
    while(A>=B&&K>0){
        B*=2;
        K--;
    }
    while(B>=C&&K>0){
        C*=2;
        K--;
    }
    if(A<B&&B<C)printf("Yes\n");
    else printf("No\n");
    return 0;
}


#include <stdio.h>

int main(void) {

  long a,b,c,k,count = 0;
  scanf("%ld %ld %ld %ld", &a, &b, &c, &k);
  while (b <= a) {
    count++;
    b *= 2;
  }
  while (c <= b) {
    count++;
    c *= 2;
  }
  if (count <= k) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }

  return 0;
}


#include<stdio.h>
int main(){
  float a,b,c,m1,m2;
  int k,n1=0,n2=0,i;
  scanf("%f %f %f ",&a,&b,&c);
  scanf("%d",&k);
  m1=a/b;m2=1;
  for(i=1;i<=k;i++){
    if(m1<m2){
    }else{
      m2=m2*2;
      n1++;
    }
  }
  //printf("%d %d %f %f\n",n1,n2,m1,m2);
  m1=(b*m2)/c;m2=1;
  for(i=1;i<=k;i++){
    if(m1<m2){
    }else{
      m2=m2*2;
      n2++;
    }
  }
  //printf("%d %d %f %f\n",n1,n2,m1,m2);
  //printf("%d",n1+n2);
  if(n1+n2<=k){printf("Yes");}
  else{printf("No");}
}


#include<stdio.h>
int main(){
  float a,b,c,m1,m2;
  int k,n1=0,n2=0,i;
  scanf("%f %f %f ",&a,&b,&c);
  scanf("%d",&k);
  m1=a/b;m2=1;
  for(i=1;i<=k;i++){
    if(m1>m2){
      m2=m2*2;
      n1++;
    }
  }
  //printf("%d %d %f %f\n",n1,n2,m1,m2);
  m1=(b*m2)/c;m2=1;
  for(i=1;i<=k;i++){
    if(m1<m2){
    }else{
      m2=m2*2;
      n2++;
    }
  }
  //printf("%d %d %f %f\n",n1,n2,m1,m2);
  //printf("%d",n1+n2);
  if(n1+n2<=k){printf("Yes");}
  else{printf("No");}
}


#include<stdio.h>
int main(){
  float a,b,c,m1,m2;
  int k,n1=0,n2=0,i;
  scanf("%f %f %f ",&a,&b,&c);
  scanf("%d",&k);
  m1=a/b;m2=1;
  for(i=1;i<=k;i++){
    if(m1>m2){
      m2=m2*2;
      n1++;
    }
  }
  //printf("%d %d %f %f\n",n1,n2,m1,m2);
  m1=(b*m2)/c;m2=1;
  for(i=1;i<=k;i++){
    if(m1>m2){
      m2=m2*2;
      n2++;
    }
  }
  //printf("%d %d %f %f\n",n1,n2,m1,m2);
  //printf("%d",n1+n2);
  if(n1+n2<=k){printf("Yes");}
  else{printf("No");}
}


function Main(input) {
  input = input.replace(/\n/g, ' ');
  input = input.split(" ");
  var A = Number(input[0]);
  var B = Number(input[1]);
  var C = Number(input[2]);
  var D = Number(input[3]);
  var ans = 0;
  var i=0;
  var l=0;
  while(true){
    if(A<B){
      ans+=i;
      break;
    }
    B*=2;
    i++;
  }
  while(true){
    if(B<C){
      ans+=l;
      break;
    }
    C*=2;
    l++;
  }
  if(D>=ans){
    console.log("Yes");
  }else{
    console.log("No");
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(arg) {
    let [a,b,c] = arg.split("\n")[0].split(" ").map(Number)
    let k = Number(arg.split("\n")[1])

    b_ = b
    c_ = c
    for(let i=0; i<k; i++) {
        if(b <= a){
            b=b*2;
        } else {
            c=c*2;
        }
    }
    console.log((b>a && c>b) ? 'Yes' : 'No')

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


var GET = (function () {function f(s) {return new g(s);}function g(s) {this._s = s.trim().split("\n");}g.prototype.getValue = function (n) {return this._s[n];};g.prototype.getArray = function (n) {return this.stoa(this._s[n]);};g.prototype.slice = function (s, limit) {return this._s.slice(s, +limit + s || undefined).map(v => this.stox(v));};g.prototype.sliceArray = function (s, limit) {return this._s.slice(s, +limit + s || undefined).map(v => this.stoa(v));};g.prototype.stoa = function (s) {return s.split(" ").map(v => this.stox(v));};g.prototype.stox = function (v) {var i = +v;return (i === i) ? i : v;};return f;})();
var o = GET(require("fs").readFileSync("/dev/stdin", "utf8"));

console.log(main());
function main(){
    var card = o.getArray(0);
    var A = card[0];
    var B = card[1];
    var C = card[2];
    var K = o.getValue(1);

    var i = 0;
    while(K > i++) {
        if (A >= B) {
            B = 2 * B;
            continue;
        }
        C = 2 * C;
    }
    return  (B > A && C > B) ? 'Yes' : 'No';
}


//let input = "7 4 2\n3";

function main(input){
  input = input.trim();
  let l1 = input.split("\n")[0];
  let l2 = input.split("\n")[1];
  let r = parseInt(l1.split(" ")[0]);
  let g = parseInt(l1.split(" ")[1]);
  let b = parseInt(l1.split(" ")[2]);
  let n = parseInt(l2);

  function hantei(){
    return(r<g && g<b);
  }

  function magic(){
    if(r>g){
      g = g*2;
    }else if(g>b){
      b = b*2
    }
  }

  for(i=0; i<n; i++){
    magic();
  }
  let answer = "";
  if(hantei()===true){
    answer = "Yes";
  }else{
    answer = "No";
  }
  console.log(answer);
}

//main(input);

main(require("fs").readFileSync("/dev/stdin","utf8"));


"use strict";

function main(input) {
  input = input.trim().split("\n");
  const line_one = input[0].split(" ");
  const K = parseInt(input[1]);
  let line_one_arr = [];

  for (let i in line_one) {
    line_one_arr.push(parseInt(line_one[i]));
  }

  let i = 0;
  let can = false;
  while (line_one_arr[0] >= line_one_arr[1]) {
    if (i > K) break;
    line_one_arr[1] = line_one_arr[1] * 2;
    i++;
  }
  while (line_one_arr[1] >= line_one_arr[2]) {
    if (i > K) break;
    line_one_arr[2] = line_one_arr[2] * 2;
    i++;
  }
  console.log(line_one_arr);
  if (
    line_one_arr[0] < line_one_arr[1] &&
    line_one_arr[1] < line_one_arr[2] &&
    i <= K
  ) {
    can = true;
  }

  if (can) {
    console.log("Yes");
  } else {
    console.log("No");
  }
}

function numberSort(array) {
  array.sort(f);
  return array;
}

var f = function (a, b) {
  return a - b;
};

main(require("fs").readFileSync("/dev/stdin", "utf-8"));


"use strict";

function main(input) {
  input = input.trim().split("\n");
  const line_one = input[0].split(" ");
  const K = parseInt(input[1]);
  let line_one_arr = [];

  for (let i in line_one) {
    line_one_arr.push(parseInt(line_one[i]));
  }

  let i = 0;
  let can = false;
  while (line_one_arr[0] >= line_one_arr[1]) {
    if (i > K) break;
    line_one_arr[1] = line_one_arr[1] * 2;
    i++;
  }
  while (line_one_arr[1] >= line_one_arr[2]) {
    if (i > K) break;
    line_one_arr[2] = line_one_arr[2] * 2;
    i++;
  }

  if (line_one_arr[0] < line_one_arr[1] && line_one_arr[1] < line_one_arr[2]) {
    can = true;
  }

  if (can) {
    console.log("Yes");
  } else {
    console.log("No");
  }
}

function numberSort(array) {
  array.sort(f);
  return array;
}

var f = function (a, b) {
  return a - b;
};

main(require("fs").readFileSync("/dev/stdin", "utf-8"));


package main

import "fmt"

func main() {
	var a, b, c, k int
	fmt.Scanf("%d", &a)
	fmt.Scanf("%d", &b)
	fmt.Scanf("%d", &c)
	fmt.Scanf("%d", &k)

	var ans bool
	for i := 0; i < k; i++ {

		if b >= c {
			c = c * 2
		} else if a >= b {
			b = b * 2
		}

		if a < b && b < c {
			ans = true
			break
		}
	}

	if ans == true {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


package main

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

func main() {
	sc := NewScanner()

	a := sc.ReadInt()
	b := sc.ReadInt()
	c := sc.ReadInt()
	k := sc.ReadInt()

	count := 0

	bBig := b
	for bBig <= a {
		bBig *= 2
		count++
	}

	cBig := c
	for cBig <= bBig {
		cBig *= 2
		count++
	}

	if count <= k {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

// from [my library](https://github.com/ikngtty/go-contestlib)
// -   math/simple

func Abs(x int) int {
	if x >= 0 {
		return x
	}
	return -x
}

func Min(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}

	min := values[0]
	for _, v := range values {
		if v < min {
			min = v
		}
	}
	return min
}

func Max(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}

	max := values[0]
	for _, v := range values {
		if v > max {
			max = v
		}
	}
	return max
}

func Pow(base, exponent int) int {
	if exponent < 0 {
		panic(fmt.Sprintf("exponent (%d) should not be a minus", exponent))
	}

	answer := 1
	for i := 0; i < exponent; i++ {
		answer *= base
	}
	return answer
}

func Ceil(divident, dividor int) int {
	if dividor == 0 {
		panic("dividor should not be 0")
	}

	quo := divident / dividor
	rem := divident % dividor

	if rem != 0 {
		if (divident > 0 && dividor > 0) ||
			(divident < 0 && dividor < 0) {
			return quo + 1
		}
	}
	return quo
}

// -   sortutil

func ReverseInts(a []int) {
	sort.Sort(sort.Reverse(sort.IntSlice(a)))
}

func ReverseStrings(a []string) {
	sort.Sort(sort.Reverse(sort.StringSlice(a)))
}

// -   io

type Scanner struct {
	bufScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bufSc := bufio.NewScanner(os.Stdin)
	bufSc.Split(bufio.ScanWords)
	bufSc.Buffer(nil, 100000000)
	return &Scanner{bufSc}
}

func (sc *Scanner) ReadString() string {
	bufSc := sc.bufScanner
	bufSc.Scan()
	return bufSc.Text()
}

func (sc *Scanner) ReadInt() int {
	bufSc := sc.bufScanner
	bufSc.Scan()
	text := bufSc.Text()

	num, err := strconv.Atoi(text)
	if err != nil {
		panic(err)
	}
	return num
}


package main

import "fmt"

func main() {
	a := 0
	b := 0
	c := 0
	k := 0

	fmt.Scanf("%d %d %d", &a, &b, &c)
	fmt.Scanf("%d", &k)

	for i := 0; i < k; i++ {
		if c <= b {
			c *= 2
		} else if b <= a {
			b *= 2
		} else {
			c *= 2
		}

	}

	if a < b && b < c {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}

}


package main

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

/*-----------Main-----------*/

func main() {
	a, b, c := readI(), readI(), readI()
	k := readI()
	for i := 0; i < k; i++ {
		switch {
		case a > b:
			b *= 2
		case b > c:
			c *= 2
		}
	}
	if a < b && b < c {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

/*-----------Utilities-----------*/

var sc = bufio.NewScanner(os.Stdin)

func init() {
	if len(os.Args) >= 2 {
		if os.Args[1] == "debug" {
			debug()
		}
	}
	const maxBuf = 200100
	var buf []byte = make([]byte, maxBuf)
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBuf)
}

func debug() {
	testFile, err := os.Open("./test/sample-1.in")
	if err != nil {
		fmt.Fprintln(os.Stderr, "Error : There is no testfile.")
		os.Exit(1)
	}
	sc = bufio.NewScanner(testFile)
}

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

func readSs(a int) []string {
	b := make([]string, a)
	for i := 0; i < a; i++ {
		b[i] = readS()
	}
	return b
}

func readI() int {
	sc.Scan()
	r, _ := strconv.Atoi(sc.Text())
	return r
}

func readIs(a int) []int {
	b := make([]int, a)
	for i := 0; i < a; i++ {
		b[i] = readI()
	}
	return b
}

func readF() float64 {
	sc.Scan()
	r, _ := strconv.ParseFloat(sc.Text(), 64)
	return r
}

func readFs(a int) []float64 {
	b := make([]float64, a)
	for i := 0; i < a; i++ {
		b[i] = readF()
	}
	return b
}

func max(a []int) int {
	l := len(a)
	m := a[0]
	for i := 1; i < l; i++ {
		if a[i] > m {
			m = a[i]
		}
	}
	return m
}

func min(a []int) int {
	l := len(a)
	m := a[0]
	for i := 1; i < l; i++ {
		if a[i] < m {
			m = a[i]
		}
	}
	return m
}

func sortI(a []int) []int {
	sort.Ints(a)
	return a
}

func reverse(a []int) []int {
	l := len(a)
	r := make([]int, l)
	for i := 0; i < l; i++ {
		r[i] = a[l-i-1]
	}
	return r
}

func countI(a []int, b int) int {
	l := len(a)
	var c int
	for i := 0; i < l; i++ {
		if a[i] == b {
			c++
		}
	}
	return c
}


package main

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

/*-----------Main-----------*/

func main() {
	a, b, c := readI(), readI(), readI()
	k := readI()
	for i := 0; i < k; i++ {
		if a > b {
			b *= 2
			continue
		} else if b > c {
			c *= 2
			continue
		} else {
			break
		}
	}
	if a < b && b < c {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

/*-----------Utilities-----------*/

var sc = bufio.NewScanner(os.Stdin)

func init() {
	if len(os.Args) >= 2 {
		if os.Args[1] == "debug" {
			debug()
		}
	}
	const maxBuf = 200100
	var buf []byte = make([]byte, maxBuf)
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBuf)
}

func debug() {
	testFile, err := os.Open("./test/sample-1.in")
	if err != nil {
		fmt.Fprintln(os.Stderr, "Error : There is no testfile.")
		os.Exit(1)
	}
	sc = bufio.NewScanner(testFile)
}

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

func readSs(a int) []string {
	b := make([]string, a)
	for i := 0; i < a; i++ {
		b[i] = readS()
	}
	return b
}

func readI() int {
	sc.Scan()
	r, _ := strconv.Atoi(sc.Text())
	return r
}

func readIs(a int) []int {
	b := make([]int, a)
	for i := 0; i < a; i++ {
		b[i] = readI()
	}
	return b
}

func readF() float64 {
	sc.Scan()
	r, _ := strconv.ParseFloat(sc.Text(), 64)
	return r
}

func readFs(a int) []float64 {
	b := make([]float64, a)
	for i := 0; i < a; i++ {
		b[i] = readF()
	}
	return b
}

func max(a []int) int {
	l := len(a)
	m := a[0]
	for i := 1; i < l; i++ {
		if a[i] > m {
			m = a[i]
		}
	}
	return m
}

func min(a []int) int {
	l := len(a)
	m := a[0]
	for i := 1; i < l; i++ {
		if a[i] < m {
			m = a[i]
		}
	}
	return m
}

func sortI(a []int) []int {
	sort.Ints(a)
	return a
}

func reverse(a []int) []int {
	l := len(a)
	r := make([]int, l)
	for i := 0; i < l; i++ {
		r[i] = a[l-i-1]
	}
	return r
}

func countI(a []int, b int) int {
	l := len(a)
	var c int
	for i := 0; i < l; i++ {
		if a[i] == b {
			c++
		}
	}
	return c
}


package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"os"
	"sort"
	"strconv"
)

const (
	initialBufSize = 1e4
	maxBufSize     = 1e6 + 7
)

var buf []byte = make([]byte, maxBufSize)
var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBufSize)
}

func main() {
	A, B, C, K := nextInt(), nextInt(), nextInt(), nextInt()
	for i := 0; i < K; i++ {
		if A > B {
			B *= 2
		} else if B > C {
			C *= 2
		}
	}
	if A < B && B < C {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

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

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func abs(a int) int {
	if a > 0 {
		return a
	} else {
		return -a
	}
}

func pow(p, q int) int {
	res := p
	if q == 0 {
		return 1
	}
	for i := 0; i < q-1; i++ {
		res *= p
	}
	return res
}

func MinOf(vars ...int) int {
	min := vars[0]
	for _, i := range vars {
		if min > i {
			min = i
		}
	}
	return min
}

func MaxOf(vars ...int) int {
	max := vars[0]
	for _, i := range vars {
		if max < i {
			max = i
		}
	}
	return max
}

func gcdof2numbers(a int, b int) int {
	if b == 0 {
		return a
	}
	return gcdof2numbers(b, a%b)
}

func lcmof2numbers(a int, b int) int {
	return a / gcdof2numbers(a, b) * b
}

// マイナスの場合は考慮していない
func fuctorial(a int) int {
	if a == 1 || a == 0 {
		return 1
	} else {
		return fuctorial(a-1) * a
	}
}

func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}

// 素因数分解したmapを返す
func primeFuctorize(n int) map[int]int {
	pf := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			pf[i]++
			n /= i
		}
	}
	if n != 1 {
		pf[n]++
	}
	return pf
}

// ここから拝借
// https://shoman.hatenablog.com/entry/2020/02/25/185456
// Stackは[]intのエイリアス
type Stack []int

// Push adds an element
func (s *Stack) Push(v int) {
	*s = append(*s, v)
}

// Pop removes the top element and return it
func (s *Stack) Pop() (int, error) {
	if s.Empty() {
		return 0, fmt.Errorf("stack is empty")
	}

	v := (*s)[len(*s)-1]
	*s = (*s)[:len(*s)-1]
	return v, nil
}

// Peek returns the top value
func (s *Stack) Peek() (int, error) {
	if s.Empty() {
		return 0, fmt.Errorf("stack is empty")
	}

	return (*s)[len(*s)-1], nil
}

// Size returns the length of stack
func (s *Stack) Size() int {
	return len(*s)
}

// Empty returns true when stack is empty
func (s *Stack) Empty() bool {
	return s.Size() == 0
}

// NewStack generates stack
func NewStack() *Stack {
	s := new(Stack)
	return s
}

// golangの公式サンプルより
// https://xn--go-hh0g6u.com/pkg/container/heap/#example__intHeap
// IntHeap は，整数の最小ヒープです。
type IH []int

func (h IH) Len() int           { return len(h) }
func (h IH) Less(i, j int) bool { return h[i] < h[j] }
func (h IH) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }

func (h *IH) Push(x interface{}) {
	// Push と Pop はポインタレシーバを使っています。
	// なぜなら，スライスの中身だけでなく，スライスの長さも変更するからです。
	*h = append(*h, x.(int))
}

func (h *IH) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

// golangの公式サンプルより
// https://xn--go-hh0g6u.com/pkg/container/heap/#example__priorityQueue

// Item は，優先キューで管理する項目です。
type Item struct {
	value    string // 値。任意です。
	priority int    // キューにおける優先度
	// index は heap.Interface メソッドで更新されます。
	index int // ヒープにおけるインデックス
}

// PriorityQueue は heap.Interface を実装し，Item のリストを保持します。
type PriorityQueue []*Item

func (pq PriorityQueue) Len() int { return len(pq) }

func (pq PriorityQueue) Less(i, j int) bool {
	// Pop が最小ではなく最大の優先度を持つ項目を返して欲しいので，ここでは > を使っています。
	return pq[i].priority > pq[j].priority
}

func (pq PriorityQueue) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *PriorityQueue) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Item)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *PriorityQueue) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // メモリリークを避ける
	item.index = -1 // 安全のため
	*pq = old[0 : n-1]
	return item
}

// update はキューの Item の優先度と値を更新します。
func (pq *PriorityQueue) update(item *Item, value string, priority int) {
	item.value = value
	item.priority = priority
	heap.Fix(pq, item.index)
}


r,g,b = gets.split.map(&:to_i)
k = gets.to_i

k.times do
    if r>=g
        g*=2
    elsif g>=b
        b*=2
    end
    #p r,g,b
end

puts (r<g and g<b) ? "Yes" : "No"


a, b, c = gets.split.map &:to_i
k = gets.to_i
while a>=b
  b*=2
  k -= 1
end
while b>=c
  c*=2
  k -= 1
end
puts ((k>=0) ? :Yes : :No)


a,b,c = gets.split.map(&:to_i)
k = gets.to_i
k.times do
  if b <= a
    b *= 2
  elsif c <= b
    c *= 2
  end
end
if a < b && b < c
  puts 'Yes'
else
  puts 'No'
end


a, b, c = gets.split.map { |t| t.to_i }

k = gets.to_i

[0, 1].repeated_permutation(k) do |bits|
  x, y, z = a, b, c
  bits.each do |bit|
    if bit.zero?
      y **= 2
    else
      z **= 2
    end
  end

  if x < y && y < z
    puts "Yes"
    exit
  end
end

puts "No"


a, b, c = gets.split.map(&:to_i)
K = gets.to_i
cnt = 0
while true do
  if b < a
    b *= 2
    cnt += 1
  else
    break
  end
end

while true do
  if c < b
    c *= 2
    cnt += 1
  else
    break
  end
end
puts cnt <= K ? "Yes" : "No"


a, b, c = gets.split.map(&:to_i)
K = gets.to_i
cnt = 0
while true do
  if b < a
    b *= 2
    cnt += 1
  else
    break
  end
end

while true do
  if c < b
    c *= 2
    cnt += 1
  else
    break
  end
end
puts cnt <= K "Yes" : "No"


fn main() {
    proconio::input! {
        a: usize,
        mut b: usize,
        mut c: usize,
        mut k: usize,
    }
    while a>=b && k>0 {
        b*=2;
        k-=1;
    }
    while b>=c && k>0 {
        c*=2;
        k-=1;
    }
    println!("{}",if a<b && b<c {"Yes"} else {"No"});
}


use input::Input;

fn main() {
    let mut input = Input::default();

    let a: u32 = input.parse();
    let b: u32 = input.parse();
    let c: u32 = input.parse();
    let k: u32 = input.parse();

    if c > b && b > a {
        println!("Yes");
        return;
    }

    for i in 0..(1 << k) {
        let (red, mut green, mut blue) = (a, b, c);
        for j in 0..k {
            if i >> j & 1 == 1 {
                green *= 2;
            } else {
                blue *= 2;
            }
            if blue > green && green > red {
                println!("Yes");
                return;
            }
        }
    }
    println!("No");
}

#[allow(dead_code)]
pub mod input {
    #[derive(Default)]
    pub struct Input(Vec<String>);

    impl Input {
        pub fn read_line(&mut self) -> String {
            let mut s = String::new();
            std::io::stdin().read_line(&mut s).ok().expect("read error");
            s
        }
        pub fn parse<T: std::str::FromStr>(&mut self) -> T {
            let x = if let Some(x) = self.0.pop() {
                x
            } else {
                let s = self.read_line();
                self.0 = s.split_whitespace().map(String::from).rev().collect();
                self.0.pop().expect("reached EOF")
            };
            x.parse().ok().expect("parse error")
        }
    }
}


fn main() {
  proconio::input! {a:u8,mut b:u8,mut c:u8,k:u8}
  for _ in 0..k {
    if a>=b {
      b*=2;
    } else if b>=c {
      c*=2;
    } else {
      break;
    }
  }
  println!("{}",if a<b && b<c {"Yes"} else {"No"});
}


use proconio::input;

fn main() {
    input! {
        a: i32,
        mut b: i32,
        mut c: i32,
        K: usize,
    }

    let mut flag = false;
    for i in 0..K {
        for j in 0..K {
            for k in 0..K {
                let x = a * (1 << i);
                let y = b * (1 << j);
                let z = c * (1 << k);
                if i + j + k <= K && x < y && y < z {
                    flag = true;
                }
            }
        }
    }

    let ans = if flag { "Yes" } else { "No" };

    println!("{}", ans);
}


use proconio::input;

fn main() {
    input! {
        a: i32,
        mut b: i32,
        mut c: i32,
        k: usize,
    }

    for _ in 0..k {
        if a > b {
            b *= 2;
        } else if b > c {
            c *= 2;
        }
    }

    let ans = if a < b && b < c { "Yes" } else { "No" };

    println!("{}", ans);
}


use proconio::input;

fn main() {
    input! {
        a: i32,
        mut b: i32,
        mut c: i32,
        k: usize,
    }

    for _ in 0..k {
        if a > b {
            b *= 2;
        }
        if b > c {
            c *= 2;
        }
    }

    let ans = if a < b && b < c { "Yes" } else { "No" };

    println!("{}", ans);
}


func main() {
    var abc = readLine()!.split(separator: " ").map{Int($0)!}
    var k = Int(readLine()!)!
    while abc[1] <= abc[0] {
        abc[1] *= 2
        k -= 1
    }
    while abc[2] <= abc[1] {
        abc[2] *= 2
        k -= 1
    }
    print(k>=0 ? "Yes" : "No")
}

main()


let inp = readLine()!.split(separator: " ").map { Int($0)! }

var a = inp[0]
var b = inp[1]
var c = inp[2]

var k = Int(readLine()!)!

while k > 0 && (b <= a || c <= b) {
  if b <= a {
    b *= 2
  } else if c <= b {
    c *= 2
  }
  k -= 1
}
print(b > a && c > b ? "Yes" : "No")


fileprivate struct Scanner {
    private var elements = [String]()
    private var index = 0

    mutating func peek() -> String {
        while elements.count == index {
            elements = readLine()!.split(separator: " ").map(String.init)
            index = 0
        }
        return elements[index]
    }

    mutating func next() -> String {
        let value = peek()
        index += 1
        return value
    }

    mutating func nextInt() -> Int {
        return Int(next())!
    }

    mutating func nextDouble() -> Double {
        return Double(next())!
    }
}

func main() {
    var scanner = Scanner()
    let A = scanner.nextInt()
    var B = scanner.nextInt()
    var C = scanner.nextInt()
    let K = scanner.nextInt()

    var need = 0

    while A >= B {
        B *= 2
        need += 1
    }
    while B >= C {
        C *= 2
        need += 1
    }

    if need <= K {
        print("Yes")
    } else {
        print("No")
    }
}

main()


import Foundation

let abc = readLine()!.split(separator: " ").compactMap { Int($0) }
let a = abc[0]
let b = abc[1]
let c = abc[2]
var bb:Int
var cc:Int
let k = Int(readLine()!)!
var tf = true
for i in 0..<k{
  bb = b
  cc = c
  cc *= Int(pow(Double(2),Double(i)))
  bb *= Int(pow(Double(2),Double((k-i))))
  if cc>bb && bb>a{
    tf = false
    print("Yes")
    break
  }
}
if tf{
  print("No")
}


import Foundation

let input = readLine()!.components(separatedBy: " ").map{ Int($0)! }
let N = input[0]
let K = input[1]
var pointArray = readLine()!.components(separatedBy: " ").map{ Int($0)! }
let evaluationNum = N - K

var thisTerm = 1
var prevTerm = 1

for j in 0...evaluationNum {
    thisTerm = 1
    for i in j...K - 1 + j {
        thisTerm *= pointArray[i]
        }
    if j == 0 {
        prevTerm = thisTerm
    } else if prevTerm < thisTerm {
        print("Yes")
        prevTerm = thisTerm
    } else if prevTerm >= thisTerm {
        print("No")
        prevTerm = thisTerm
    }
}


import Foundation

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

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

func readThreeInts(separator: String.Element = " ") -> (a: Int, b: Int, c: Int) {
    let ints = readLine()!.split(separator: separator).map { Int($0)! }
    return (a: ints[0], b: ints[1], c: ints[2])
}

func mainB() {
    let (A, B, C) = readThreeInts()
    let K = readInt()

    for k in 0...K {
        for i in 0...k {
            let Bd = B * max(2 * (k - i), 1)
            let Cd = C * max(2 * i, 1)

            if A < Bd, Bd < Cd {
                print("Yes")
                return
            }
        }
    }

    print("No")
}

mainB()


import * as fs from 'fs';

 const input = fs.readFileSync('/dev/stdin', 'utf8');
//const input = fs.readFileSync('./input.txt', 'utf8');

_b(input);

function _b(input: string) {
  const [ABC, _K] = input.split('\n');
  const K = parseInt(_K);
  const [A, B, C] = ABC.split(' ').map((s) => parseInt(s));
  // console.log(A, B, C, K);

  // A は B の何倍か？を 2^n で表す
  const n = Math.max(0, Math.ceil(Math.log2((A + 1) / B)));
  const b = B * 2 ** n;

  // b は C の何倍か？を 2^m で表す
  const m = Math.max(0, Math.ceil(Math.log2((b + 1) / C)));

  // console.log(n, m, b);

  console.log(n + m <= K ? 'Yes' : 'No');
}


//0:実行モード
//1:開発モード
const sys_debugMode:number = 0;

function chk(in_data1 : any, in_data2? : any) : void{
	if (sys_debugMode == 0){
		return;
	}
	else if (in_data2 === undefined){
		console.log(in_data1);
	}
	else{
		console.log(in_data1 + "[" + typeof(in_data2) + "] =", in_data2);
	}
}

function prt(in_data : any) : void{
	console.log(in_data);
}

class ParamManager {

	private a_s_inputLines : string[];
	private n_maxLine : number;
	private n_nowLineCnt : number;

	constructor(){
		this.a_s_inputLines = this.inputLines();
		this.n_maxLine = this.a_s_inputLines.length;
		this.descLines();
		this.n_nowLineCnt = 1;
	}
	inputLines(){
		const fs = require('fs');

		let text;
		if(sys_debugMode == 0){
			text = fs.readFileSync("/dev/stdin", 'utf8');
		}
		else{
			text = fs.readFileSync("input.txt", 'utf8');
		}

		const line:string[] = text.toString().replace(/\r/g, "").split('\n');

		return line;
	}
	descLines(){
		chk("ParamManager.a_s_inputLines", this.a_s_inputLines);
	}
	getNextLine(in_s_type?):any{
		if (this.n_nowLineCnt > this.n_maxLine){
			chk("ParamManager.getNextLine","No Next Line!");
			return;
		}
		const s_returnLine:string = this.a_s_inputLines[this.n_nowLineCnt - 1];

		this.n_nowLineCnt++;

		if (in_s_type == "n"){
			return parseInt(s_returnLine);
		}
		else if (in_s_type == "a"){
			return s_returnLine.split(" ");
		}
		else if (in_s_type == "an"){
			const a_s_temp = s_returnLine.split(" ");
			const a_n_temp = a_s_temp.map(function(str){return Number(str)});
			return a_n_temp;
		}
		else{
			return s_returnLine;
		}
	}
}
const paramManager = new ParamManager();
//==================================================
//https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_b
//B - Magic 2

//M 君は、以下の  3  枚のカードを持っています。
//整数  A  が書かれた赤のカード
//整数  B  が書かれた緑のカード
//整数  C  が書かれた青のカード

//彼は天才的な魔術師なので、以下の操作を  K  回まで行うことができます。
//3  枚のうちいずれか  1  枚のカードを選び、書かれた整数を  2  倍する。

//操作を行った後、以下の条件が同時に満たされれば、魔術は成功です。
//緑のカードに書かれている整数は、赤のカードに書かれている整数より真に大きい。
//青のカードに書かれている整数は、緑のカードに書かれている整数より真に大きい。

//魔術を成功させることができるかどうか判定してください。
//==================================================
class Param{
	cardNumRed:number	= null;
	cardNumGreen:number	= null;
	cardNumBlue:number	= null;
	magicJikkouKaisu:number	= null;

	constructor(){
		chk("--------------------------------------------------");
		chk("パラメータ");
		//A B C
		//1 ≤ A , B , C ≤ 7
		//入力はすべて整数
		const aTemp = paramManager.getNextLine('an');
		//整数  A  が書かれた赤のカード
		this.cardNumRed	= aTemp[1-1];
		//整数  B  が書かれた緑のカード
		this.cardNumGreen = aTemp[2-1];
		//整数  C  が書かれた青のカード
		this.cardNumBlue = aTemp[3-1];

		//K
		//1 ≤ K ≤ 7
		//入力はすべて整数
		//以下の操作を  K  回まで行うことができます
		this.magicJikkouKaisu = paramManager.getNextLine("n");

		chk(this);
	}
}
const param = new Param();
//==================================================
class Kumiawase{
	no:number = null;
	aKumiawaseNum:number[] = [];
	cardNumRed:number   = param.cardNumRed;
	cardNumGreen:number = param.cardNumGreen;
	cardNumBlue:number  = param.cardNumBlue;
	bMagicSuccess:boolean = false;
}
//==================================================
class Manager{
	aKumiawase:Kumiawase[] = [];

	constructor(){
		this.main();
	}

	main():void{
		chk("--------------------------------------------------");
		chk("main");

		this.makeKumiawase();
		this.magicJikkou();

		this.resultOutput();
	}

	magicJikkou():void{
		chk("--------------------------------------------------");
		chk("magicJikkou");

		//ループ　組み合わせ配列
		for (const loopKumiawase of this.aKumiawase) {
			//chk('==================================================');
			//chk('loopKumiawase',loopKumiawase);

			//ループ　組み合わせ番号
			for (const loopKumiawaseNum of loopKumiawase.aKumiawaseNum) {
				//chk('loopKumiawaseNum',loopKumiawaseNum);

				//彼は天才的な魔術師なので、以下の操作を  K  回まで行うことができます。
				//3  枚のうちいずれか  1  枚のカードを選び、書かれた整数を  2  倍する。
				switch (loopKumiawaseNum) {
					case 1:	//red
						loopKumiawase.cardNumRed *= 2;
						break;
					case 2:	//green
						loopKumiawase.cardNumGreen *= 2;
						break;
					case 3:	//blue
						loopKumiawase.cardNumBlue *= 2;
						break;
				}
			}

			//操作を行った後、以下の条件が同時に満たされれば、魔術は成功です。
			//緑のカードに書かれている整数は、赤のカードに書かれている整数より真に大きい。
			//青のカードに書かれている整数は、緑のカードに書かれている整数より真に大きい。
			if(	loopKumiawase.cardNumGreen > loopKumiawase.cardNumRed
				&&
				loopKumiawase.cardNumBlue  > loopKumiawase.cardNumGreen
			){
				loopKumiawase.bMagicSuccess = true;
			}
			else{
				loopKumiawase.bMagicSuccess = false;
			}
		}
		chk('this.aKumiawase',this.aKumiawase);
	}

	makeKumiawase():void{
		chk("--------------------------------------------------");
		chk("makeKumiawase");

		//作成　組み合わせベース
		const aKumiawaseBase:number[][] = this.kumiawaseChoufukuAri([1,2,3], 3);
		//chk('aKumiawaseBase',aKumiawaseBase);

		//ループ　組み合わせベース
		for (const loopKumiawase of aKumiawaseBase) {
			//作成　オブジェクト　組み合わせ
			const k = new Kumiawase();
			k.no = this.aKumiawase.length + 1;
			k.aKumiawaseNum = loopKumiawase;

			//登録　オブジェクト　組み合わせ
			this.aKumiawase.push(k);
		}

		chk('this.aKumiawase',this.aKumiawase);
	}

	kumiawaseChoufukuAri(in_aBaseNum:number[], in_pickupNum:number):number[][]{
		function getCombArr(len = 2, comb = 1) {
			const num = Math.pow(len, comb),
			makeArr = (v, i) => {
				const n = i.toString(len),
				padStr = '0'.repeat(comb - n.length);
				return (padStr + n).split('');
			};
			return [...Array(num).keys()].map(makeArr);
		};
		function getComb(arr = [], comb = 1) {
			const base = getCombArr(arr.length, comb),
			convert = v => arr[v],
			makeArr = comb => comb.map(convert);
			return base.map(makeArr);
		};
		return getComb(in_aBaseNum, in_pickupNum);
	}

	  resultOutput():void{
		chk("--------------------------------------------------");
		chk("resultOutput");

		//フィルタ　組み合わせ配列　①魔術成功
		const aKumiawaseFilter:Kumiawase[] = this.aKumiawase.filter(item => item.bMagicSuccess == true);
		chk('aKumiawaseFilter',aKumiawaseFilter);

		//成功数
		const successNum:number = aKumiawaseFilter.length;
		chk('successNum',successNum);

		//魔術を成功させることができる場合は、Yes と出力してください。
		if(successNum>=1){
			prt("Yes");
		}
		//そうでない場合は、No と出力してください。
		else{
			prt("No");
		}
	}

}
const manager = new Manager();
//==================================================


//0:実行モード
//1:開発モード
const sys_debugMode:number = 1;

function chk(in_data1 : any, in_data2? : any) : void{
	if (sys_debugMode == 0){
		return;
	}
	else if (in_data2 === undefined){
		console.log(in_data1);
	}
	else{
		console.log(in_data1 + "[" + typeof(in_data2) + "] =", in_data2);
	}
}

function prt(in_data : any) : void{
	console.log(in_data);
}

class ParamManager {

	private a_s_inputLines : string[];
	private n_maxLine : number;
	private n_nowLineCnt : number;

	constructor(){
		this.a_s_inputLines = this.inputLines();
		this.n_maxLine = this.a_s_inputLines.length;
		this.descLines();
		this.n_nowLineCnt = 1;
	}
	inputLines(){
		const fs = require('fs');

		let text;
		if(sys_debugMode == 0){
			text = fs.readFileSync("/dev/stdin", 'utf8');
		}
		else{
			text = fs.readFileSync("input.txt", 'utf8');
		}

		const line:string[] = text.toString().replace(/\r/g, "").split('\n');

		return line;
	}
	descLines(){
		chk("ParamManager.a_s_inputLines", this.a_s_inputLines);
	}
	getNextLine(in_s_type?):any{
		if (this.n_nowLineCnt > this.n_maxLine){
			chk("ParamManager.getNextLine","No Next Line!");
			return;
		}
		const s_returnLine:string = this.a_s_inputLines[this.n_nowLineCnt - 1];

		this.n_nowLineCnt++;

		if (in_s_type == "n"){
			return parseInt(s_returnLine);
		}
		else if (in_s_type == "a"){
			return s_returnLine.split(" ");
		}
		else if (in_s_type == "an"){
			const a_s_temp = s_returnLine.split(" ");
			const a_n_temp = a_s_temp.map(function(str){return Number(str)});
			return a_n_temp;
		}
		else{
			return s_returnLine;
		}
	}
}
const paramManager = new ParamManager();
//==================================================
//https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_b
//B - Magic 2

//M 君は、以下の  3  枚のカードを持っています。
//整数  A  が書かれた赤のカード
//整数  B  が書かれた緑のカード
//整数  C  が書かれた青のカード

//彼は天才的な魔術師なので、以下の操作を  K  回まで行うことができます。
//3  枚のうちいずれか  1  枚のカードを選び、書かれた整数を  2  倍する。

//操作を行った後、以下の条件が同時に満たされれば、魔術は成功です。
//緑のカードに書かれている整数は、赤のカードに書かれている整数より真に大きい。
//青のカードに書かれている整数は、緑のカードに書かれている整数より真に大きい。

//魔術を成功させることができるかどうか判定してください。
//==================================================
class Param{
	cardNumRed:number	= null;
	cardNumGreen:number	= null;
	cardNumBlue:number	= null;
	magicJikkouKaisu:number	= null;

	constructor(){
		chk("--------------------------------------------------");
		chk("パラメータ");
		//A B C
		//1 ≤ A , B , C ≤ 7
		//入力はすべて整数
		const aTemp = paramManager.getNextLine('an');
		//整数  A  が書かれた赤のカード
		this.cardNumRed	= aTemp[1-1];
		//整数  B  が書かれた緑のカード
		this.cardNumGreen = aTemp[2-1];
		//整数  C  が書かれた青のカード
		this.cardNumBlue = aTemp[3-1];

		//K
		//1 ≤ K ≤ 7
		//入力はすべて整数
		//以下の操作を  K  回まで行うことができます
		this.magicJikkouKaisu = paramManager.getNextLine("n");

		chk(this);
	}
}
const param = new Param();
//==================================================
class Kumiawase{
	no:number = null;
	aKumiawaseNum:number[] = [];
	cardNumRed:number   = param.cardNumRed;
	cardNumGreen:number = param.cardNumGreen;
	cardNumBlue:number  = param.cardNumBlue;
	bMagicSuccess:boolean = false;
}
//==================================================
class Manager{
	aKumiawase:Kumiawase[] = [];

	constructor(){
		this.main();
	}

	main():void{
		chk("--------------------------------------------------");
		chk("main");

		this.makeKumiawase();
		this.magicJikkou();

		this.resultOutput();
	}

	magicJikkou():void{
		chk("--------------------------------------------------");
		chk("magicJikkou");

		//ループ　組み合わせ配列
		for (const loopKumiawase of this.aKumiawase) {
			//chk('==================================================');
			//chk('loopKumiawase',loopKumiawase);

			//ループ　組み合わせ番号
			for (const loopKumiawaseNum of loopKumiawase.aKumiawaseNum) {
				//chk('loopKumiawaseNum',loopKumiawaseNum);

				//彼は天才的な魔術師なので、以下の操作を  K  回まで行うことができます。
				//3  枚のうちいずれか  1  枚のカードを選び、書かれた整数を  2  倍する。
				switch (loopKumiawaseNum) {
					case 1:	//red
						loopKumiawase.cardNumRed *= 2;
						break;
					case 2:	//green
						loopKumiawase.cardNumGreen *= 2;
						break;
					case 3:	//blue
						loopKumiawase.cardNumBlue *= 2;
						break;
				}
			}

			//操作を行った後、以下の条件が同時に満たされれば、魔術は成功です。
			//緑のカードに書かれている整数は、赤のカードに書かれている整数より真に大きい。
			//青のカードに書かれている整数は、緑のカードに書かれている整数より真に大きい。
			if(	loopKumiawase.cardNumGreen > loopKumiawase.cardNumRed
				&&
				loopKumiawase.cardNumBlue  > loopKumiawase.cardNumGreen
			){
				loopKumiawase.bMagicSuccess = true;
			}
			else{
				loopKumiawase.bMagicSuccess = false;
			}
		}
		chk('this.aKumiawase',this.aKumiawase);
	}

	makeKumiawase():void{
		chk("--------------------------------------------------");
		chk("makeKumiawase");

		//作成　組み合わせベース
		const aKumiawaseBase:number[][] = this.kumiawaseChoufukuAri([1,2,3], 3);
		//chk('aKumiawaseBase',aKumiawaseBase);

		//ループ　組み合わせベース
		for (const loopKumiawase of aKumiawaseBase) {
			//作成　オブジェクト　組み合わせ
			const k = new Kumiawase();
			k.no = this.aKumiawase.length + 1;
			k.aKumiawaseNum = loopKumiawase;

			//登録　オブジェクト　組み合わせ
			this.aKumiawase.push(k);
		}

		chk('this.aKumiawase',this.aKumiawase);
	}

	kumiawaseChoufukuAri(in_aBaseNum:number[], in_pickupNum:number):number[][]{
		function getCombArr(len = 2, comb = 1) {
			const num = Math.pow(len, comb),
			makeArr = (v, i) => {
				const n = i.toString(len),
				padStr = '0'.repeat(comb - n.length);
				return (padStr + n).split('');
			};
			return [...Array(num).keys()].map(makeArr);
		};
		function getComb(arr = [], comb = 1) {
			const base = getCombArr(arr.length, comb),
			convert = v => arr[v],
			makeArr = comb => comb.map(convert);
			return base.map(makeArr);
		};
		return getComb(in_aBaseNum, in_pickupNum);
	}

	  resultOutput():void{
		chk("--------------------------------------------------");
		chk("resultOutput");

		//フィルタ　組み合わせ配列　①魔術成功
		const aKumiawaseFilter:Kumiawase[] = this.aKumiawase.filter(item => item.bMagicSuccess == true);
		chk('aKumiawaseFilter',aKumiawaseFilter);

		//成功数
		const successNum:number = aKumiawaseFilter.length;
		chk('successNum',successNum);

		//魔術を成功させることができる場合は、Yes と出力してください。
		if(successNum>=1){
			prt("Yes");
		}
		//そうでない場合は、No と出力してください。
		else{
			prt("No");
		}
	}

}
const manager = new Manager();
//==================================================


n,d = map(int,input().split())
pnt = [list(map(int,input().split())) for _ in range(n)]

def dst(i, j):
    a = pnt[i]
    b = pnt[j]
    ret = 0
    for p, q in zip(a, b):
        ret += (p - q) ** 2
    r = int(ret ** (0.5))
    if r ** 2 == ret:
        return True
    else:
        return False

ret = 0
for i in range(n):
    for j in range(i + 1, n):
        tmp = dst(i, j)
        if tmp:
            ret += 1
print(ret)


import sys
sys.setrecursionlimit(10 ** 6)

def calc_dist(x, y):
    dist = 0
    for xi, yi in zip(x, y):
        dist += (yi - xi) ** 2
    return dist ** (1/2)

def main():
    N, D = map(int, sys.stdin.readline().rstrip().split())
    X = [list(map(int, sys.stdin.readline().rstrip().split())) for _ in range(N)]

    ans = 0
    for i in range(N):
        for j in range(i+1, N):
            dist = calc_dist(X[i], X[j])
            if dist.is_integer():
                ans += 1

    print(ans)

if __name__ == '__main__':
    main()


from math import sqrt
N, D = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(N)]
ans = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        Y = X[i]
        Z = X[j]
        d = sqrt(sum([(y - z) ** 2 for y, z in zip(Y, Z)]))
        if float(int(d)) == d:
            ans += 1
print(ans)


n,d=map(int,input().split())
point=[]
for _ in range(n):
    point.append(list(map(int,input().split())))
ans=0
for i in range(n-1):
    for l in range(1,n):
        if i==l:
            continue
        dis=0
        for f in range(d):
            dis+=(point[i][f]-point[l][f])**2
        dis=dis**0.5
        #print(dis)
        if dis.is_integer():
            ans+=1
print(ans)


#ABC133 B

import math
N,D = map(int,input().split())
point = []
count = 0
for i in range(N):
    X = list(map(int,input().split()))
    point.append(X)
for i in range(1,N):
    for j in range(i+1,N+1):
        for k in range(D):
            S = 0
            square = []
            square.append(((point[i-1][k])-(point[j-1][k]))**2)
            S += math.sqrt(sum(square))
            if S % 1 ==0:
                count += 1

print(count)


#ABC133 B

import math
N,D = map(int,input().split())
point = []
count = 0
for i in range(N):
    X = list(map(int,input().split()))
    point.append(X)
for i in range(1,N):
    for j in range(i+1,N+1):
        S = 0
        for k in range(D):
            square = []
            square.append(((point[i-1][k])-(point[j-1][k]))**2)
            S += math.sqrt(sum(square))
            if S % 1 ==0:
                count += 1

print(count)


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {

		FastScanner sc = new FastScanner();
		int N = sc.nextInt();
		int D = sc.nextInt();

		int[][] x = new int[N + 1][D + 1];
		for (int i = 1; i < N + 1; i++) {
			for (int j = 1; j < D + 1; j++)
				x[i][j] = sc.nextInt();
		}
		int s = 0;
		int count = 0;
		for (int i = 1; i < N + 1; i++) {
			for (int j = i + 1; j < N + 1; j++) {
				for (int d = 1; d < D + 1; d++) {
					s += Math.pow(x[i][d] - x[j][d], 2);
				}
				int a = (int) Math.sqrt(s);
				if (s == a * a)
					count++;
				s=0;
			}
		}
		System.out.println(count);

	}

}

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

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

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

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

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

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

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

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

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


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] tmpArray = br.readLine().split(" ");

		int n = Integer.parseInt(tmpArray[0]);
		int d = Integer.parseInt(tmpArray[1]);

		int input[][] = new int[n][d];

		HashSet<Integer> square = new HashSet<Integer>();

		for(int i = 0; i < 150; i++){
			square.add(i*i);
		}
		for(int i = 0; i < n; i++){
			tmpArray = br.readLine().split(" ");

			for(int j = 0; j < d; j++){
				input[i][j] = Integer.parseInt(tmpArray[j]);
			}
		}

		int count = 0;

		for(int i = 0; i < n; i++){
			for(int j = i + 1; j < n; j++){
				int distSq = 0;

				for(int k = 0; k < d; k++){
					distSq += Math.pow(input[i][k] - input[j][k], 2);
				}

				if(square.contains(distSq)){
					count++;
				}
			}
		}

		System.out.println(count);
	}

}


import java.io.*;
import java.util.*;

public class Main {
    private static InputStream is;
    private static PrintWriter out;
    private static String INPUT = "";

    void solve() {
        int n = ni(), d = ni();
        int x[][] = new int[n][d];
        int a = 0;
        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < d; ++j) {
                x[i][j] = ni();
            }
        }
        for (int i = 0; i < n; ++i) {
            for (int j = i + 1; j < n; ++j) {
                int q = distance(x[i], x[j]);
                int w = (int) Math.round(Math.sqrt(q));
                if (w * w == q) a++;
            }
        }
        out.println(a);
    }

    int distance(int x[], int y[]) {
        int d = 0;
        int n = x.length;
        for (int i = 0; i < n; ++i) {
            d += Math.pow(x[i] - y[i], 2);
        }
        return d;
    }

    public static void main(String[] args) throws Exception {
        is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);
        new Main().solve();
        out.flush();
    }

    private static boolean eof() {
        if (lenbuf == -1) return true;
        int lptr = ptrbuf;
        while (lptr < lenbuf)
            if (!isSpaceChar(inbuf[lptr++])) return false;

        try {
            is.mark(1000);
            while (true) {
                int b = is.read();
                if (b == -1) {
                    is.reset();
                    return true;
                } else if (!isSpaceChar(b)) {
                    is.reset();
                    return false;
                }
            }
        } catch (IOException e) {
            return true;
        }
    }

    private static byte[] inbuf = new byte[1024];
    static int lenbuf = 0, ptrbuf = 0;

    private static int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }

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

    private static int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b))
            ;
        return b;
    }

    private static double nd() {
        return Double.parseDouble(ns());
    }

    private static char nc() {
        return (char) skip();
    }

    private static String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private static char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private static char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++)
            map[i] = ns(m);
        return map;
    }

    private static int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = ni();
        return a;
    }

    private static long[] nal(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nl();
        return a;
    }

    private static int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private static long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private class XorShift {
        int x = 123456789;
        int y = 362436069;
        int z = 521288629;
        int w = 88675123;

        int nextInt(int n) {
            final int t = x ^ (x << 11);
            x = y;
            y = z;
            z = w;
            w = (w ^ (w >>> 19)) ^ (t ^ (t >>> 8));
            final int r = w % n;
            return r < 0 ? r + n : r;
        }
    }

    private static void tr(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}


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

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int D = scanner.nextInt();

        int[][] X = new int[N][D];

        for (int i = 0 ; i < N ; i++) {
            for (int j = 0 ; j < D ; j++) {
                X[i][j] = scanner.nextInt();
            }
        }

        Set<Integer> pow = new HashSet<>();
        for (int i = 1 ; i <= 64 ; i++) {
            pow.add(i * i);
        }

        int count = 0;
        for (int i = 0 ; i < N ; i++) {
            for (int j = i + 1 ; j < N ; j++) {
                int dist = 0;
                for (int k = 0 ; k < D ; k++) {
                    dist += (X[i][k] - X[j][k]) * (X[i][k] - X[j][k]);
                }
                if (pow.contains(dist)) {
                    count++;
                }
            }
        }

        System.out.println(count);
    }
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int N = Integer.parseInt(lines[0]);
		int D = Integer.parseInt(lines[1]);
		int[][] X = new int[N][D];
		int count = 0;

		for (int i = 0; i < N; i++) {
			line = sc.nextLine();
			lines = line.split(" ");
			for (int j = 0; j < D; j++) {
				X[i][j] = Integer.parseInt(lines[j]);
			}
		}

		for (int n = 0; n < N; n++) {
			for(int n2 = n+1; n2 < N; n2++) {
				double sum = 0;
				for (int i = 0; i < D; i++) {
					int diff = Math.abs(X[n][i] - X[n+1][i]);
					sum += diff * diff;
				}

				if(isSquareNumber(sum)) {
					count++;
				}
			}
		}

		System.out.println(count);
	}

    static // 平方数かどうかを調べる。
    boolean isSquareNumber (double number) {
        double sqrtOfNumber = Math.sqrt(number);
//    	System.out.println(sqrtOfNumber);
        return (isInteger(sqrtOfNumber));
    }

    static // 整数かどうかを調べる。
    boolean isInteger (double number) {
        return (number == Math.floor(number));
    }

}


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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int D = sc.nextInt();
		Set<Integer>  set = new HashSet<Integer>();
		for (int i=1;i<1000;i++) {
			set.add(i*i);
		}
		int count =0;
		int a[][] = new int[N][D];
		for (int i=0;i<N;i++) {
			for (int j=0;j<D;j++) {
				a[i][j] = sc.nextInt();
			}
		}
		for (int i=0;i<N;i++) {
			for (int j=i+1;j<N;j++) {
				int temp =0;
				for (int k=0;k<D;k++) {
					temp +=(a[i][k]-a[j][k])*(a[i][k]-a[j][k]);
					if(set.contains(temp)) {
						count++;
					}
				}
			}
		}
		System.out.println(count);
	}
}


#include <bits/stdc++.h>

using namespace std;

int main () {
	int N, D, c = 0;
	cin >> N >> D;
	vector<vector<int>> S(N);
	for (int i = 0; i < N; i++) {
		S[i].resize(D);
		for (int j = 0; j < D; j++) {
			cin >> S[i][j];
		}
	}
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < i; j++) {
			int m = 0;
			for (int k = 0; k < D; k++) {
				int e = S[i][k] - S[j][k];
				m += (e * e);
			}
			int r = floor(sqrt((double)m));
			if (r * r == m) {
				c++;
			}
		}
	}
	cout << c << endl;
}