#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
struct fast_ios { fast_ios(){ cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(20); }; } fast_ios_;
const int INF = (int)1e9;
const ll INFL = (ll)1e18;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
int dx[]={0, 0, -1, 1};
int dy[]={1, -1, 0, 0};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

long double solve(long double x1,long double y1,long double x2,long double y2)
{
    long double ans;

    ans = sqrt(pow(x1, 2) - 2 * x1 * x2 + pow(x2, 2) + (pow(y1, 2) - 2 * y1 * y2 + pow(y2, 2)));
    return ans;
}

int main()
{
    long double r, x, y, a,ans;
    int b;
    cin >> r >> x >> y;
    a = solve(0, 0, x, y);
    if (a == r)
        cout << 1 << endl;
    else if (a <= r + r)
        cout << 2 << endl;
    else
    {
        ans = (a / r);
        b = ceil(ans);
        cout << b << endl;
    }
    return 0;
}

#include<bits/stdc++.h>
#include<stdlib.h>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
#include<deque>
#include<vector>
#include<string>
#include<cstring>
using namespace std;
#define FAST ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define ll long long

int main(){
	long double r,x,y;
	cin>>r>>x>>y;
	long double m=x*x+y*y;
    long double x1=m/2;
	long double x0;
    do{
        x0=x1;
        x1=(x0+m/x0)/2;
    }while(fabs(x0-x1)>=0.000000001);
    long double k=x1/r;
	x1=ceil(k);
	if(k<1) x1++;
	cout<<x1<<endl;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using pld = pair<ld,ld>;
using vi = vector<int>;
using vll = vector<ll>;
using vld = vector<ld>;
#define rep(j, m) for (int j = 0; j < (int)(m); j++)
#define rep2(i, l, n) for (int i = l; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
const ld PI=3.1415926535897932;

int main() {
	ll N,K;
	cin >> N >> K;
	K = abs(K);
	ll x = 2 + K,y = 2;
	ll ans = 0;
	rep(i,2*N - 1 - K) {
		ll a,b;
		if (x <= N) {a = x - 1;}
		else {a = 2*N + 1 - x;}
		if (y <= N) {b = y - 1;}
		else {b = 2*N + 1 - y;}
		ans += a*b;
		x++;
		y++;

	}
	cout << ans << endl;
}

#include <bitset>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <valarray>

// alias, using declaration
using llint = long long; using ldouble = long double;
template <class T = llint> using vector = std::vector<T>;
template <class T = llint> using deque = std::deque<T>;
template <class T = llint> using list = std::list<T>;
template <class T = llint, class U = llint> using map = std::map<T, U>;
template <class T = llint, class U = llint> using mmap = std::multimap<T, U>;
template <class T = llint> using set = std::set<T>;
template <class T = llint> using mset = std::multiset<T>;
template <class T = llint, class U = llint> using umap = std::unordered_map<T, U>;
template <class T = llint, class U = llint> using ummap = std::unordered_multimap<T, U>;
template <class T = llint> using uset = std::unordered_set<T>;
template <class T = llint> using umset = std::unordered_multiset<T>;
template <class T = llint, class U = T> using pair = std::pair<T, U>;
template <class T = llint> using varray = std::valarray<T>;
template <class T = llint, class... U> using pqueue = std::priority_queue<T, U...>;
using std::array; using std::bitset; using std::string; using std::tuple;

// constant
constexpr llint INF = 0x3FFFFFFFFFFFFFFF;
constexpr llint INVALID = 0x8000000000000000;

namespace io {
  // in
  template <class... T, size_t... S> auto in(std::index_sequence<S...>) {tuple<T...> t; (..., (std::cin >> std::get<S>(t))); return t;}
  template <class... T, size_t... S> auto in(std::index_sequence<S...>, size_t n) {tuple<vector<T>...> t{vector<T>(n)...}; for (size_t i = 0; i < n; i++) (..., (std::cin >> std::get<S>(t)[i])); return t;}
  template <size_t N, class T = llint, class... U> auto in() {static_assert(N >= 1); if constexpr (N > 1) return in<N - 1, T, T, U...>(); else return in<T, U...>(std::index_sequence_for<T, U...>());}
  template <size_t N, class T = llint, class... U> auto in(size_t n) {static_assert(N >= 1); if constexpr (N > 1) return in<N - 1, T, T, U...>(n); else return in<T, U...>(std::index_sequence_for<T, U...>(), n);}
  template <size_t N, class T = llint> auto in(size_t n, size_t m) {static_assert(N == 1); vector<vector<T>> v(n, vector<T>(m)); for (auto&& vi : v) for (auto&& vij : vi) std::cin >> vij; return std::make_tuple(v);}
  // out
  template <class T, class... U> void out(const T& a, const U&... b) {std::cout << a << (sizeof...(b) ? " " : "\n"); if constexpr (sizeof...(b)) out(b...);}
  template <class T, class U = const char*> void out(const vector<T>& a, U d = " ") {for (auto&& b : a) std::cout << b << (&b != &a.back() ? d : "\n");}
}

int main() {
  // input
  auto [t, N] = io::in<2>();

  // solve
  auto tax = [&](llint A) {
    return (100 + t) * A / 100;
  };
  llint l = 0, h = 100000000000000000;
  while (h - l > 1) {
    llint m = (h + l) / 2;
    (tax(m) - m < N ? l : h) = m;
  }
  llint result = tax(l) + N - (tax(l) - l);

  // output
  io::out(result);
}


/**
 * Dont raise your voice, improve your argument.
 * --Desmond Tutu
 */

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

const bool ready = [](){
    ios_base::sync_with_stdio(false); cin.tie(0);
    cout << fixed << setprecision(12);
    return true;
}();

using ld=long double;
const ld PI = acos(-1);
using ll= long long;
#define int ll
#define all(v) (v).begin(), (v).end()
#define fori(n) for(int i=0; i<int(n); i++)

#define cini(i) int i; cin>>i;
#define cins(s) string s; cin>>s;
#define cind(d) ld d; cin>>d;
#define cinai(a,n) vi a(n); fori(n) { cin>>a[i]; }
#define cinas(s,n) vs s(n); fori(n) { cin>>s[i]; }
#define cinad(a,n) vd a(n); fori(n) { cin>>a[i]; }

using pii= pair<int, int>;
using pdd= pair<ld, ld>;
using vd= vector<ld>;
using vb= vector<bool>;
using vi= vector<int>;
using vvi= vector<vi>;
using vs= vector<string>;

#define endl "\n"

/* We can buy the n+1 and split it to 1 and n
 * Then there is 1 to n avail and
 * 2 to n-1 needed.
 * Buy the n and split into 2 and n-2.
 * Buy the n-1
 * Avail 1..n-2
 * Needed 3..n-3
 * Buy the n-2 ans split into 3 and n-5...
 *
 * So we can buy one for two until
 * i + sum(1..i)>n
 **/
void solve() {
    cini(n);

    int cnt=0;
    int sum=0;
    int ans=n;
    for(int i=1; ; i++) {
        sum+=i;
        if(n+1-sum>i)
            ans--;
        else
            break;
    }
    cout<<ans<<endl;
}

signed main() {
    solve();
}

// FIRST THINK, THEN CODE
// DO NOT JUMP BETWEEN PROBLEMS

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

const int MAX_N = 101;
int n;
ll x, a[MAX_N];
ll dp[MAX_N][MAX_N][MAX_N];

ll go(int k)
{
	memset(dp,-1,sizeof(dp));
	dp[0][0][0]=0;
	for(int i=0;i<n;++i)for(int j=0;j<=i;++j)for(int m=0;m<k;++m)if(dp[i][j][m]!=-1){
		dp[i+1][j][m]=max(dp[i+1][j][m], dp[i][j][m]);
		if(j+1<=k)dp[i+1][j+1][(m+a[i])%k]=max(dp[i+1][j+1][(m+a[i])%k], dp[i][j][m]+a[i]);
	}
	return dp[n][k][x%k];
}

void solve()
{

	ll ans = 2e18;
	for(int k=1;k<=n;++k){
		ll res=go(k);
		if(res != -1) ans=min(ans, (x-res)/k);
	}
	cout<<ans<<'\n';
}

int main()
{
	cin >> n >> x;
	for(int i=0;i<n;++i)cin>>a[i];
	solve();
	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <cstdio>
#include <limits>
#define rep(i,n) for(int i = 0; i < n; ++i)
#define rep1(i,n) for(int i = 1; i <= n; ++i)
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if(a < b){ a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if(a > b){ a = b; return 1; } return 0; }
template<class T> inline int  sz(T &a) { return a.size(); }
using ll = long long; using ld = long double;
using pi = pair<int,int>; using pl = pair<ll,ll>;
using vi = vector<int>; using vvi = vector<vi>;
using vl = vector<ll>; using vvl = vector<vl>;
const int inf = numeric_limits<int>::max();
const ll infll = numeric_limits<ll>::max();
int main()
{
  int n; cin >> n;
  vi x(n),y(n);
  rep(i,n) cin >> x[i] >> y[i];

  int res = 0;
  rep(i,n) {
    rep(j,n) {
      if(i >= j) continue;
      int dx = abs(x[i] - x[j]), dy = abs(y[i] - y[j]);
      if(dy <= dx) res++;
    }
  }
  cout << res << "\n";
  return 0;
}

#include <bits/stdc++.h>
#define int long long
using namespace std;
using vec_int = vector<int>;
using P = pair<int,int>;
using T = tuple<int,int,int>;
using ll = long long;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

signed main()
{
    int A, B; cin>>A>>B;
    vec_int primes = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71};
    int diff = B-A+1;

    vector<vec_int> DP(diff+1, vec_int((1<<20), 0));
    DP.at(0).at(0) = 1;

    for(int i=0;i<diff;i++){
        int num = A+i;

        int state = 0;
        for(int j=0;j<20;j++){
            if(num%primes.at(j)==0)state+=(1<<j);
        }

        for(int j=0;j<(1<<20);j++){
            DP.at(i+1).at(j) += DP.at(i).at(j);
            if((j&state)==0){
                DP.at(i+1).at(j+state) += DP.at(i).at(j);
            }
        }
    }
    int result = 0;
    for(int j=0;j<(1<<20);j++){
        result += DP.at(diff).at(j);
    }
    cout<<result<<endl;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
long long INF = 1LL<<60;
using ll = long long;
using vll = vector<ll>;
using mll = map<ll, ll>;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

int main(){
    ll N2; cin >> N2;
    string S, S0, S1;
    cin >> S;
    S0 = S.substr(0, N2);
    S1 = S.substr(N2, N2*2);

    ll Q; cin >> Q;
    rep(q, 0, Q){
        ll T; cin >> T;
        ll A, B; cin >> A >> B;
        if(T == 1){
            A--; B--;
            if(A < N2 && B < N2)
                swap(S0.at(A), S0.at(B));
            else if(A < N2)
                swap(S0.at(A), S1.at(B - N2));
            else if(B < N2)
                swap(S1.at(A - N2), S0.at(B));
            else
                swap(S1.at(A - N2), S1.at(B -  N2));
        }
        else if(T == 2){
            swap(S0, S1);
        }
    }
    cout << S0 << S1 << endl;
    return 0;
}

#include <bits/stdc++.h>
#include <cassert>
#define rep(i, N) for (int i = 0; i < (N); ++i)
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep3(i, a, b) for (ll i = a; i >= b; --i)
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(c) begin(c), end(c)
#define ok() puts(ok ? "Yes" : "No");
template <class T> bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T> bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using ii = pair<int, int>;
using vvi = vector<vi>;
using vii = vector<ii>;
using gt = greater<int>;
using minq = priority_queue<int, vector<int>, gt>;
using P = pair<ll, ll>;
template <class T> void takeUnique(vector<T> &v) {
  auto last = std::unique(v.begin(), v.end());
  v.erase(last, v.end());
}
const ll LINF = 1e18L + 1;
const int INF = 1e9 + 1;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int dxx[] = {0, 1, 1, 1, 0, -1, -1, -1};
int dyy[] = {1, 1, 0, -1, -1, -1, 0, 1};
// clang++ -std=c++11 -stdlib=libc++

int a[5];
int main() {
  int ans = INF;
  rep(i, 4) {
    int b;
    cin >> b;
    chmin(ans, b);
  }
  cout << ans << endl;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define mod 1e9+7
#define ff first
#define ss second
#define ins insert
#define endl "\n"
#define pie_op ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define tc int t;cin>>t;while(t--)
#define pb push_back
#define input(n) int arr[n];for(int i1=0;i1<n;i1++)cin>>arr[i1]

int main()
{
	pie_op;
	ll n, ans = INT_MAX;
	cin >> n;
	for(int i = 0; i <= 60; i++){
		ll b = i;
		ll a = n / (1LL << b);
		ll c = n - a * (1LL << b);
		ans = min(ans, a + b + c);
	}
	cout << ans;
	return 0;
}

#include <bits/stdc++.h>

using namespace std;
using llong = long long;
using ldbl = long double;
using lpair = pair<llong, llong>;

#define ALL(x) x.begin(), x.end()

constexpr llong mod = 1e9+7;
constexpr llong inf = mod * mod;

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

  llong ans = inf;
  for (llong b = 0; b <= 60; b++) {
    llong a = N / (1ll << b);
    llong c = N % (1ll << b);
    ans = min(ans, a + b + c);
  }

  cout << ans << endl;

  return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll,ll> pi;
typedef vector<pi> vp;
typedef set<ll> si;
typedef map<string, ll> msi;
#define REP(i,a,b) \
for(ll i=ll(a);i<=ll(b);i++)
#define DEP(i,a,b) \
for(ll i=ll(a);i>=ll(b);i--)
#define TR(c, it) \
for (auto it = (c).begin(); it != (c).end(); it++)
#define mp make_pair
#define pb push_back
#define F first
#define S second
ll mod = 1e9+7;
vector<ll> c(100001);
vector<ll> adj[100001];
vector<bool> visited(100001,false);
vector<ll> color(100001,0);
vector<ll> ans;
void dfs(ll v){
  visited[v]=true;
  if(color[c[v]]==0)ans.push_back(v);
      color[c[v]]++;
  for(auto x:adj[v]){
    if(visited[x]==false){
      dfs(x);
    }
  }
  color[c[v]]--;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);

  int T;
  T=1;
  while(T--)
  {
      ll n,i,j,k,l,m;
      cin>>n;
      REP(i,1,n)cin>>c[i];
      REP(i,1,n-1){
        cin>>j>>k;
        adj[j].pb(k);
        adj[k].pb(j);
      }
      dfs(1);
      sort(ans.begin(),ans.end());
    for(auto x: ans)cout<<x<<endl;
  }
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define FIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define mod 1000000007
#define endl "\n"
#define test ll txtc; cin>>txtc; while(txtc--)
typedef long long int ll;
typedef long double ld;
int main() {
    FIO;
    //test
    {
      string s; cin>>s;
      ll n=(ll)s.length();
      vector<vector<ll>>dp(n,vector<ll>(26,0));
      dp[0][s[0]-'a']++;
      for(ll i=1;i<n;i++){
          dp[i][s[i]-'a']++;
          for(ll j=0;j<26;j++){
              dp[i][j]+=dp[i-1][j];
          }
      }
      ll ans=0,last=n,op=-1;
      for(ll i=n-2;i>=1;i--){
          ll ch=s[i]-'a';
          if(s[i]==s[i-1]){
              if(op!=ch){
                  ans+=(n-last);
              }
              //cout<<ans<<endl;
              ans-=(dp[last-1][ch]-dp[i][ch]);
              //cout<<ans<<endl;
              ans+=(last-i-1);
              //cout<<ans<<endl;
              op=ch;
              last=i;
          }
      }
      cout<<ans<<endl;
    }
	return 0;
}


#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstring>
#define fi              first
#define se              second
#define mp              make_pair
#define all(x)          x.begin(), x.end()
#define For(it, x, y)	for(int it = x; it < y; it ++)
#define ios             ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define bug(str, x)     cerr << "# " << str << " : " << x << '\n'
#define here(x)         cerr << "here " << x << '\n'

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int maxn = 2e5 + 10;
const int maxa = 2e5;
const int inf = 1e9;
int a[maxn];
bool visited[maxn];
vector<int> G[maxn];

void dfs(int v){
	visited[v] = true;
	for(int u : G[v]){
		if(!visited[u]){
			dfs(u);
		}
	}
}

int main(){
	ios;
	int n;
	cin >> n;
	For(i, 0, n){
		cin >> a[i];
	}
	For(i, 0, n / 2){
		G[a[i]].push_back(a[n - 1 - i]);
		G[a[n - 1 - i]].push_back(a[i]);
	}
	int cnt = 0;
	For(i, 1, maxa + 1){
		if(!visited[i]){
			dfs(i);
			cnt ++;
		}
	}
	cout << maxa - cnt;
}

#include <bits/stdc++.h>

using namespace std;

#define int long long

#define sz(x) (int)(x.size())
#define all(x) (x).begin(), (x).end()

const int N = 2e5 + 4;

vector<int> adj[N];
bool vis[N];
int sz = 0;

void dfs(int u) {
	if (vis[u]) return;
	++sz; vis[u] = true;
	for (auto &v : adj[u]) {
		dfs(v);
	}
}

int32_t main() {
	ios_base::sync_with_stdio(false); cin.tie(0);
	int n; cin >> n;
	int a[n];
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	for (int i = 0; i < (n + 1) / 2; ++i) {
		if (a[i] != a[n - i - 1]) {
			adj[a[i]].emplace_back(a[n - i - 1]);
			adj[a[n - i - 1]].emplace_back(a[i]);
		}
	}
	int ans = 0;
	for (int i = 1; i < N; ++i) {
		if (!vis[i]) {
			sz = 0;
			dfs(i);
			ans += (sz - 1);
		}
	}
	cout << ans;
	return 0;
}


//設定言語check
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <limits.h>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <queue>
#define REP(i,n) for((i)=0;(i)<(int)(n);(i)++)
using namespace std;

int main(){
  long long int N, L, K, ans = 0, flag = 0 ;
  int i, j, k, cas, num ;
  cin >> N ;
  long long int A[N+2], B[N+2] ;
  REP(i,N){
    cin >> A[i] >> B[i] ;
  }
  REP(i,N){
    REP(j,i){
      REP(k,j){
        L = (A[i]-A[k]) * (B[i]-B[j]) ;
        K = (A[i]-A[j]) * (B[i]-B[k]) ;
        if(L == K){
          cout << "Yes" << endl ;
          return 0 ;
        }
      }
    }
  }

  cout << "No" << endl ;
  return 0 ;
}

#include<iostream>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<stack>
#include<queue>
#include<deque>
#include<algorithm>
#include<cmath>
#include<functional>
#include<bitset>
#include<iomanip>
#define _GLIBCXX_DEBUG
#define fi first
#define se second
#define pb push_back
#define all(x) begin(x), end(x)
#define rep(i,n) for(int i=0;i<n;++i)
#define rep2(i,l,r) for(int i=l;i<=r;++i)
#define rep3(i,l,r) for(int i=l;i>=r;--i)
#define pii pair<int,int>
#define pll pair<ll,ll>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;

template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;

const long long mod=1000000007;
const double PI = acos(-1);

int main(){
    int n;
    cin >> n;
    V<pii> vp(n);
    for(int i=0;i<n;++i){
        cin >> vp[i].fi >> vp[i].se;
    }
    bool ans = false;
    for(int i=0;i<n-2;++i){
        for(int j=i+1;j<n-1;++j){
            for(int k=j+1;k<n;++k){
                if((vp[k].fi-vp[i].fi)*(vp[j].se-vp[i].se) == (vp[j].fi-vp[i].fi)*(vp[k].se-vp[i].se)) ans = true;
            }
        }
    }
    if(ans) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}


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

int main(){
  int a,b,c,d;
  cin >> a >> b >> c >> d;
  int tot=a+b+c+d;
  int ok=0;
  if(tot-a==a)ok=1;
  if(tot-b==b)ok=1;
  if(tot-c==c)ok=1;
  if(tot-d==d)ok=1;
  if(tot-a-b==a+b)ok=1;
  if(tot-a-c==a+c)ok=1;
  if(tot-a-d==a+d)ok=1;
  if(tot-b-c==c+b)ok=1;
  if(tot-b-d==d+b)ok=1;
  if(tot-d-c==c+d)ok=1;

  if(ok)cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

#include<bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
const double pi=acos(-1.0);
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a;}return b;}
int main(void){
    long long int a,n,v,t,s,d;
    cin>>v>>t>>s>>d;
    if(v*t<=d&&d<=v*s){cout<<"No"<<endl; return 0;}
    cout<<"Yes"<<endl;

}


#include <vector>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <queue>
#include <unordered_set>

using namespace std;

#define pii pair<int,int>
#define pll pair<long long, long long>

int main(){

  int ncases;
  cin >> ncases;
  for(int z = 0; z < ncases; z++){

    long long l, r;
    long long ret = 0;
    cin >> l >> r;
    long long maxx = (r - 2 * l + 1);
    if(maxx > 0){
      ret = maxx * (maxx + 1) / 2;
    }

    cout << ret << endl;
  }
}

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; (i) < n ; i++)

using namespace std;
using ll = long long;

ll result(ll a, ll b){
    ll v = b - 2 * a + 1;
    ll u = v * (v + 1)/2;
    return u;
}
int main(){
    int T; cin >> T;

    ll outc[T];
    rep(i,T){

        ll l, r ; cin >> l >> r;
        if (r >= 2 * l){
            ll c = result(l,r);
            outc[i] = c;

        } else {
            outc[i] = 0;
        }

    }

    rep(i,T){
        cout << outc[i] << endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define chmin(x,y) x = min((x),(y))
#define chmax(x,y) x = max((x),(y))
#define popcount(x) __builtin_popcount(x)
using namespace std;
using ll = long long ;
using P = pair<int,int> ;
using pll = pair<long long,long long>;
const int INF = 1e9;
const long long LINF = 1e17;
const int MOD = 1000000007;
//const int MOD = 998244353;
const double PI = 3.14159265358979323846;

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

    vector<ll> a(2*n);
    rep(i,2*n) cin >> a[i];

    vector<int> id(2*n);
    iota(id.begin(),id.end(),0);
    sort(id.begin(),id.end(),[&](int l,int r){
        return a[l] < a[r];
    });
    vector<int> revid(2*n);
    rep(i,2*n) revid[id[i]] = i;

    stack<int> st;
    string ans = "";
    rep(i,2*n){
        int t = revid[i] < n ? 0 : 1;
        if(st.empty()){
            ans += "(";
            st.push(t);
        }else{
            if(st.top() == 1-t){
                ans += ')';
                st.pop();
            }else{
                ans += '(';
                st.push(t);
            }
        }
    }
    cout << ans << endl;

    return 0;
}

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <vector>

typedef long long ll;
typedef unsigned long long ull;
typedef long double LD;
typedef std::pair<int, int> pii;
const int INF = 2147483647;
const int INF2 = 0x3f3f3f3f;
const ll INF64 = (ll)1e18;
const double INFD = 1e30;
const double EPS = 1e-9;
const double PI = std::acos(-1);
const int MOD = 998244353;
template <typename T>
inline T read() {
    T X = 0, w = 0;
    char ch = 0;
    while (!isdigit(ch)) {
        w |= ch == '-';
        ch = getchar();
    }
    while (isdigit(ch)) X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
    return w ? -X : X;
}
const int MAXN = 400005;
const int MAXV = (1 << 17) + 5;
int n, m, k;
int dr[4] = {0, 1, 0, -1};
int dc[4] = {-1, 0, 1, 0};
int dr2[8] = {1, 1, 1, -1, -1, -1, 0, 0};
int dc2[8] = {1, 0, -1, 1, 0, -1, 1, -1};
int CASE = 1;
int A[MAXN];
int B[MAXN];

pii st[MAXN];
char ans[MAXN];
int top;
int main() {
#ifdef LOCALLL
    freopen("in", "r", stdin);
    freopen("out", "w", stdout);
#endif
    scanf("%d", &n);
    n *= 2;
    for (int i = 1; i <= n; i++) {
        A[i] = read<int>();
        B[i] = A[i];
    }
    std::sort(B + 1, B + n + 1);
    int L = B[n / 2], R = B[n / 2 + 1];
    int smalleq = 0;
    for (int i = 1; i <= n / 2; i++) {
        if (B[i] == L) smalleq++;
    }
    for (int i = 1; i <= n; i++) {
        bool small = A[i] < L || (A[i] == L && smalleq > 0);
        if (A[i] == L && smalleq > 0) smalleq--;
        if (top != 0 && st[top].first != small) {
            ans[i] = ')';
            ans[st[top].second] = '(';
            top--;
        } else {
            st[++top] = {small, i};
        }
    }
    for (int i = 1; i <= n; i++) {
        printf("%c", ans[i]);
    }
    printf("\n");
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define int long long int
const int mod = (int)1e9 + 7;
template<class T> auto vec(int r, int c, T v){ return vector<vector<T>>(r, vector<T>(c, v)); }
template<class T> auto vec(int o1, int o2, int o3, T v){ return vector<vector<vector<T>>>(o1, vector<vector<T>>(o2, vector<T>(o3, v))); }
int power(int x, int n, int m){
    x %= m;
    int ans = 1;
    while(n > 0){
        if( n & 1 ) ( ans *= x ) %= m;
        ( x = x * x ) %= m;
        n >>= 1;
    }
    return ans;
}
#define lb(x, y) (lower_bound(x.begin(), x.end(), y) - x.begin())
#define ub(x, y) (upper_bound(x.begin(), x.end(), y) - x.begin())
#define dbg(x) cerr << "[" #x << " => " << x << "] ";

signed main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    int n; cin >> n;
    int cur = 1, b = 0;
    int res = LLONG_MAX;
    while(cur <= n) {
        int a = n / cur;
        int c = n - a * cur;
        res = min(res, a + b + c);
        cur *= 2;
        b++;
    }
    cout << res << "\n";
    return 0;
}

/*
このコード、と～おれ!
Be accepted!
∧＿∧
（｡･ω･｡)つ━☆・*。
⊂　　 ノ 　　　・゜+.
　しーＪ　　　°。+ *´¨)
 　　　　　　　　　.· ´¸.·*´¨) ¸.·*¨)
		  　　　　　　　　　　(¸.·´ (¸.·'* ☆
*/

#include <cstdio>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>
#include <functional>
#include <complex>
#include <list>
#include <cassert>
#include <iomanip>
#include <set>
#include <stack>
#include <bitset>
#include <array>
#include <chrono>

//#pragma GCC target("arch=skylake-avx512")
#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse4")
#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define repeat(i, n, m) for(int i = n; i < (m); ++i)
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printim(a) printf(a ? "possible\n" : "imposible\n")
#define printdb(a) printf("%.50lf\n", a)
#define printLdb(a) printf("%.50Lf\n", a)
#define printdbd(a) printf("%.16lf\n", a)
#define prints(s) printf("%s\n", s.c_str())
#define all(x) (x).begin(), (x).end()
#define deg_to_rad(deg) (((deg)/360.0L)*2.0L*PI)
#define rad_to_deg(rad) (((rad)/2.0L/PI)*360.0L)
#define Please return
#define AC 0
#define manhattan_dist(a, b, c, d) (abs(a - c) + abs(b - d))

using ll = long long;
using ull = unsigned long long;

constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1e9 + 7;
constexpr ll mod = 998244353;
constexpr long double eps = 1e-6;
const long double PI = acosl(-1.0L);

using namespace std;

void scans(string& str) {
	char c;
	str = "";
	scanf("%c", &c);
	if (c == '\n')scanf("%c", &c);
	while (c != '\n' && c != -1 && c != ' ') {
		str += c;
		scanf("%c", &c);
	}
}

void scanc(char& str) {
	char c;
	scanf("%c", &c);
	if (c == -1)return;
	while (c == '\n') {
		scanf("%c", &c);
	}
	str = c;
}

double acot(double x) {
	return PI / 2 - atan(x);
}

ll LSB(ll n) { return (n & (-n)); }

template<typename T>
inline T chmin(T& a, const T& b) {
	if (a > b)a = b;
	return a;
}

template<typename T>
inline T chmax(T& a, const T& b) {
	if (a < b)a = b;
	return a;
}

//cpp_int
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using namespace boost::multiprecision;
#else
using cpp_int = ll;
#endif

//atcoder library
#if __has_include(<atcoder/all>)
#include <atcoder/all>
//using namespace atcoder;
#endif

/*
	random_device seed_gen;
	mt19937 engine(seed_gen());
	uniform_int_distribution dist(1, 100);
*/

/*----------------------------------------------------------------------------------*/

int main() {

	int n;
	scanf("%d", &n);
	n = min(n, 8);
	vector<int> a(n);
	rep(i, n) {
		scanf("%d", &a[i]);
		a[i] %= 200;
	}
	vector<vector<int>> b(200);
	rep(i, (1 << n)) {
		int cur = 0;
		vector<int> c;
		rep(j, n) {
			if (i & (1 << j)) {
				cur += a[j];
				cur %= 200;
				c.push_back(j);
			}
		}
		if(b[cur].empty()) b[cur] = c;
		else {
			printf("yEs\n%d ", (int)c.size());
			for (const auto& aa : c)printf("%d\n", aa + 1);
			printf("%d\n", (int)b[cur].size());
			for (const auto& aa : b[cur])printf("%d\n", aa + 1);
			return 0;
		}
	}
	puts("nO");

	Please AC;
}


#define taskname "test"

#include <bits/stdc++.h>

using namespace std;

#define sz(x) (int)x.size()
#define fi first
#define se second

typedef long long lli;
typedef pair<int, int> pii;

string s;

void read_input()
{
    cin >> s;
}

void solve()
{
    cout << s[1] << s[2] << s[0] << '\n';
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    read_input();
    solve();
}

//  299143BT
#include<bits/stdc++.h>
#define ll int64_t
#define MOD 1000000007
#define pi 3.1415926535
#define fi first
#define se second
#define vll vector<ll>
#define vpll vector<pair <ll,ll> >
#define vvll vector< vll >
#define str string
#define umap unordered_map
#define uset unordered_set
#define rep(i,n) for(ll i=0;i<n;i++)
#define repA(i,s,n) for(ll i=s;i<=n;i++)
#define repD(i,s,n) for(ll i=s;i>=n;i--)
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define elif else if
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ALL(v) v.begin(),v.end()
#define sortA(v) sort(ALL(v))
#define sortD(v) sort(ALL(v),greater <ll> ())
#define print(v) for(auto itr:v) cout<<itr<<" ";
#define sz size()
#define nl cout<<"\n";
using namespace std;
ll factorial(ll n){return (n==1||n==0)?1:n*factorial(n-1);}
ll power(ll x,ll y){ll res=1;while(y>0){if(y&1)res=res*x;y=y>>1;x=x*x;}return res;}
ll powerMod(ll x,ll y,ll m){if(y==0)return 1;ll p=powerMod(x,y/2,m)%m;p=(p*p)%m;return (y%2==0)?p:(x*p)%m;}
ll modInverse(ll a,ll m){return powerMod(a,m-2,m);}
ll gcd(ll a,ll b){if(a==0){return b;}else if(b==0){return a;}else{if(a>b){return gcd(a%b,b);}else{return gcd(b%a,a);}}}

void pre(){

}

void solve(){
    str s;
  	cin>>s;
  	repA(i,1,s.sz-1) cout<<s[i];
  	cout<<s[0];
}

int main(){
    fast
    ll t=1;
    //cin>>t;
    pre();
    while(t--){
        solve();
    }
    return 0;
}


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

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int n;
  long long c;
  cin >> n >> c;

  vector<array<int, 2>> events;
  for (int i = 0; i < n; ++i) {
    int l, r, w;
    cin >> l >> r >> w;
    events.push_back({l, w});
    events.push_back({r + 1, -w});
  }
  sort(events.begin(), events.end());

  int prv = 0;
  long long ans = 0, sum = 0;
  for (auto [x, y] : events) {
    ans += (x - prv) * min(sum, c);
    sum += y;
    prv = x;
  }

  cout << ans << "\n";
}

#include <algorithm>
#include <iostream>
#include <cstdio>
#define ll long long
#define MOD 1000000007
using namespace std;

int main() {
    int t;
    ll n, a, b;
    cin >> t;
    while(t--) {
        cin >> n >> a >> b;
        if(a+b > n) {
            cout << 0 << endl;
            continue;
        }
        ll ans = 0;

        ans = (n-a-b+1)*(n-a-b+2)%MOD*((2*(n-a+1)*(n-b+1)%MOD-(n-a-b+1)*(n-a-b+2)%MOD+MOD)%MOD)%MOD;
        cout << ans << endl;
    }
    return 0;
}


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

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

int N;

signed main()
{
    cin >> N;

    rep(i, N)
        cout << (2 * i + 1) % N + 1 << " " << (2 * i + 2) % N + 1 << endl;

    return 0;
}

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

void chmin(int64_t& a, int64_t b){
    a = min(a, b);
}

int main(){
    int T;
   // cin >> T;
   T=1;
    typedef pair<int64_t, int64_t> P;
    while(T--){
        int64_t X,Y;
        cin >>X>>Y;

        int64_t cost[6] = {0};
        cost[2] = 1;
        cost[3] = 0;
        cost[5] = 0;

        int64_t ans = 1e18;
        priority_queue<P, vector<P>, greater<P>> que;
        map<int64_t, int64_t> memo;

        auto insert = [&](int64_t v, int64_t n){
            if(v < ans && (!memo.count(n) || v < memo[n])){
                que.emplace(v, n);
                memo[n] = v;
            }
        };
        int64_t D=1;
        que.emplace(0, Y);
        while(que.size()){
            auto p = que.top(); que.pop();
            int64_t v = p.first, n = p.second;
            if(v >= ans) break;
            if(n <= 2e18/D) chmin(ans, v+abs(n-X)*D);
            for(int d : {2}){
                int r = n%d;
                int64_t v2 = v + r*D + cost[d];
                insert(v2, n/d);
                v2 = v + (d-r)*D + cost[d];
                insert(v2, n/d+1);
            }
        }
        cout <<ans<< endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#define pii pair<int, int>
#define ld long double
#define ll long long
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    string s;
    cin >> s;
    int n = s.length();
    int cnt[300];
    memset(cnt, 0, sizeof(cnt));

    int lastIdx = n;
    char lastChar = '-';
    ll ans = 0;
    for (int i = n - 1; i >= 0; i--) {
        if (i != n - 1 && s[i] == s[i + 1]) {
            cnt[s[i]]--;
            if (lastChar == s[i]) ans += lastIdx - i - 2 - cnt[s[i]];
            else ans += n - i - 2 - cnt[s[i]];
            lastIdx = i;
            lastChar = s[i];
            memset(cnt, 0, sizeof(cnt));
        } else {
            cnt[s[i]]++;
        }
    }

    cout << ans << "\n";

}

//jai baba loknath
#include<bits/stdc++.h>
// Program showing a policy-based data structure.
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less
using namespace std;
using namespace __gnu_pbds;
typedef       long long int      ll;
// GNU link : https://goo.gl/WVDL6g
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
        tree_order_statistics_node_update>
        new_data_set;
#define       READ               freopen("in.txt", "r", stdin);
#define       WRITE              freopen("out.txt", "w", stdout);
#define       optimize           ios::sync_with_stdio(0);cin.tie(0);
#define       RESET(a, b)        memset(a, b, sizeof(a))
#define       gcd(a, b)          __gcd(a, b)
#define       MX                 200005
#define       MOD                1000000007
#define       inf                ll(1e18)
#define       PI                 acos(-1.0)
#define       eps                1e-9
#define       Yes                cout<<"Yes"<<endl;
#define       YES                cout<<"YES"<<endl;
#define       No                 cout<<"No"<<endl;
#define       NO                 cout<<"NO"<<endl;
inline void normal(ll &a) { a %= MOD; (a < 0) && (a += MOD); }
inline ll modMul(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a*b)%MOD; }
inline ll modAdd(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a+b)%MOD; }
inline ll modSub(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); a -= b; normal(a); return a; }
inline ll modPow(ll b, ll p) { ll r = 1; while(p) { if(p & 1LL) r = modMul(r, b); b = modMul(b, b); p >>= 1LL; } return r; }
inline ll modInverse(ll a) { return modPow(a, MOD-2); }
inline ll modDiv(ll a, ll b) { return modMul(a, modInverse(b)); }
inline ll mod(ll a, ll m){ if(a<0) return ((a%m)+m)%m; else if(a<m) return a; else return (a%m); }

ll LCM(ll a, ll b)
{
   return (a / __gcd(a, b)) * b;
}
//for vector of pair
/*bool cmp(pair<int,int>a, pair<int,int>b)
{
   if(a.first==b.first)
      return a.second<b.second;
   else
      return a.first<b.first;
}*/
//for priority queue of pair
class cmp {
public:
	bool operator()(pair<ll,ll> A, pair<ll,ll> B)
	{
		if(A.first==B.first)
         return A.second>B.second;
      else
         return A.first<B.first;
	}
};
ll sum[27][MX];
int main(void)
{
   optimize
   RESET(sum,0);
   ll t,n,m,k,x,y;
   vector<ll> v,v1,v2;
   vector< pair<ll,ll> > p,p1,p2;
   set<ll> st;
   map<ll,ll> mp;
   priority_queue<ll> pq;
   priority_queue< ll,vector<ll>,greater<ll> > lpq;
   priority_queue< pair<ll,ll> > phpq;
   priority_queue< pair<ll,ll>,vector<pair<ll,ll>>,cmp > phpqcmp;
   priority_queue< pair<ll,ll>,vector< pair<ll,ll> >,greater< pair<ll,ll> > > plpq;
   string s;
   //cin>>t;
   //while(t--)//for(ll tc=1;tc<=t;tc++)
   {
      cin>>s;
      for(char j='a';j<='z';j++)
      {
         for(ll i=0;i<s.size();i++)
         {
            if(i==0)
            {
               if(s[i]==j)
                  sum[j-'a'][i]=1;
               else
                  sum[j-'a'][i]=0;
            }
            else if(s[i]==j)
               sum[j-'a'][i]=sum[j-'a'][i-1]+1;
            else
               sum[j-'a'][i]=sum[j-'a'][i-1];
         }
      }
      /*for(char j='a';j<='z';j++)
      {
         for(ll i=0;i<s.size();i++)
         {
            cout<<sum[j-'a'][i]<<" ";
         }
         cout<<endl;
      }*/
      ll pos=s.size()-1,ans=0;
      char str='0';
      for(ll i=s.size()-1;i>0;i--)
      {
         if(s[i]==s[i-1])
         {
            x=sum[s[i]-'a'][pos]-sum[s[i]-'a'][i];
            ans+=(pos-i)-x;
            if(str!='0' && s[i]!=str)
               ans+=(s.size()-1-pos);
            str=s[i];
            for(ll j=i-1;j>=0;j--)
            {
               if(s[j]==s[j+1])
                  i--;
               else
                  break;
            }
            pos=i-1;
         }
      }
      cout<<ans<<endl;
   }
   return 0;
}


/*
 * author: vongkh
 * created: Sun Jan 17 2021
 */

#include <stdio.h>
#include <cstdlib>
#include <map>

int64_t x, y;
std::map<int64_t, int64_t> memo;

int64_t get_operation_num(int64_t z){
    //get the number of operation need to transform z back to x
    //each stop we have three choices : increment, decrement, divide by 2
    //Observation: divide by 2 and +/- later is more efficient
    if(memo.find(z) != memo.end()) return memo[z];
    if(z == 1) return std::abs(z - x);
    int64_t ans = std::abs(z - x);
    if(z%2){
        //if z is odd we can only do +/-
        ans = std::min(ans, get_operation_num(z-1)+1);
        ans = std::min(ans, get_operation_num(z+1) + 1);
    }else{
        //if z is even, it is optimal to try to /2
        ans = std::min(ans, get_operation_num(z/2) + 1);
    }
    return memo[z] = ans;
}

int main(){
    scanf("%lld %lld", &x, &y);
    //we solve this problem by thinking inversely
    //how to get x from y
    int64_t ans = get_operation_num(y);
    printf("%lld \n", ans);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i = (m); i <= (n); i++)
#define zep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x,m,n) for(int i = (m); i <= n; i++){cout << (x[i]) << " ";} cout<<endl;

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

    ll n, m; cin >> n >> m;
    ll a[m + 2]; rep(i, 1, m)cin >> a[i];
    sort(a + 1, a + m + 1);
    a[0] = 0;
    a[m + 1] = n + 1;

    ll mn = INF;
    rep(i, 0, m){
        if(a[i + 1] - a[i] - 1 > 0){
            mn = min(mn, a[i + 1] - a[i] - 1);
        }
    }

    ll ans = 0;
    rep(i, 0, m){
        //print(mn)
        //print(a[i + 1] - a[i] - 1)
        ans += (a[i + 1] - a[i] - 1 + mn - 1) / mn;
    }
    print(ans)

    return 0;
}


#include<bits/stdc++.h>

using namespace std;

const int N = 1e5+10;
int a[N];
int main()
{
	int n;
	cin>>n;
	int maxn1=0,st1=0;
	int maxn2=0,st2=0;
	for(int i=1;i<=(1<<n);i++)
	{
		cin>>a[i];
		if(i<=(1<<(n-1)))
		{
			if(a[i]>maxn1)
			{
				st1=i;
				maxn1=a[i];
			}

		}
		else {
			if(a[i]>maxn2)
			{
				maxn2=max(maxn2,a[i]);
				st2=i;
			}
		}
	}
	if(maxn1<=maxn2)
	{
		cout<<st1<<endl;
	}
	else {
		cout<<st2<<endl;
	}
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#include <vector>
int main() {
 int N;
  cin>>N;
  vector<int>vec(pow(2,N));
  for(int i=0;i<pow(2,N);++i){
    cin>>vec.at(i);
  }
    map<int,int>mp;
  for(int i=0;i<pow(2,N);++i){
    mp[vec[i]]=i+1;
  }
  while(vec.size()>2){
    vector<int>vec2;
    for(int i=0; i<vec.size();i+=2){
      vec2.push_back(max(vec[i],vec[i+1]));
    }
    swap(vec,vec2);
  }
  int ans = min(vec[0],vec[1]);
  cout<< mp[ans]<<endl;
  return 0;

}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define MOD 1000000007

int main() {
    double n; cin >> n;
    double x0, y0, xn, yn; cin >> x0 >> y0 >> xn >> yn;
    double vx = xn - x0;
    double vy = yn - y0;
    double theta = -(90 - (double)180 / n) * M_PI / 180;
    // cout << sqrt(vx * vx + vy * vy) << endl;
    // cout << cos(theta) << endl;
    // cout << cos(theta) - sin(theta) << endl;
    // cout << vx << " " << vy << endl;
    double ansx = cos(theta) * (vx * cos(theta) - vy * sin(theta)) + x0;
    double ansy = cos(theta) * (vx * sin(theta) + vy * cos(theta)) + y0;
    // double ansx = 1 / sqrt(vx * vx + vy * vy) * (vx * cos(theta) - vy * sin(theta)) + x0;
    // double ansy = 1 / sqrt(vx * vx + vy * vy) * (vx * sin(theta) + vy * cos(theta)) + y0;

    // double ansx = sqrt(vx * vx + vy * vy) * cos(theta) * (vx * cos(theta) - vy * sin(theta)) + x0;
    // double ansy = sqrt(vx * vx + vy * vy) * cos(theta) * (vx * sin(theta) + vy * cos(theta)) + y0;
    cout << fixed << setprecision(11) << ansx << " " << ansy << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n-1); i >= 0; i--)
#define all(v) (v).begin(),(v).end()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
template <class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template <class T> T lcm(T a, T b) { return a/gcd(a,b)*b; }
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const ll MOD = 1e9+7;

int solve(int x, int y) {
    if (x == 0 && y == 0) return 0;

    if (x+y == 0) return 1;
    if (x-y == 0) return 1;
    if (abs(x)+abs(y) <= 3) return 1;

    if ((x+y)%2 == 0) return 2;
    if (abs(x)+abs(y) <= 6) return 2;
    if (abs(x+y) <=3) return 2;
    if (abs(x-y) <=3) return 2;

    else return 3;
}

int main() {
	int x1,y1,x2,y2;
	cin >> x1 >> y1 >> x2 >> y2;
	cout << solve(x2-x1, y2-y1) << "\n";
	return 0;
}


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

int lucas(int a, int b){
  int comb = 1;
  for(;;){
    int a3 = a % 3;
    a /= 3;
    int b3 = b % 3;
    b /= 3;
    if(a3 < b3){
      comb = 0;
      break;
    }
    else if(a3 == 2 && b3 == 1)
      comb *= 2;
    if(a == 0 && b == 0)
      break;
  }
  return comb % 3;
}

int main(){
  int N;
  cin >> N;
  string s;
  cin >> s;
  int ans = 0;
  for(int i = 0;i < N;i++){
    char c = s.at(i);
    int plus = 0;
    if(c == 'R')
      plus = 1;
    else if(c == 'B')
      plus = 2;
    int comb = lucas(N - 1, i);
    plus *= comb;
    ans += plus;
  }
  if(N % 2 == 0)
    ans = (ans * 2) % 3;
  else
    ans %= 3;
  if(ans % 3 == 0)
    cout << "W" << endl;
  else if(ans % 3 == 1)
    cout << "R" << endl;
  else
    cout << "B" << endl;
}

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author tatsumack
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>

#define int long long
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1001001001001001001ll
#define fcout cout << fixed << setprecision(12)

using namespace std;

struct Comb {
    vector<vector<long long>> com;
    long long p;

    Comb(long long _p) : p(_p) {
        init(p);
    }

    void init(long long p) {  // 動的計画法で前処理
        com.assign(p, vector<long long>(p));
        com[0][0] = 1;
        for (int i = 1; i < p; i++) {
            com[i][0] = 1;
            for (int j = i; j > 0; j--) {
                com[i][j] = (com[i - 1][j - 1] + com[i - 1][j]) % p;
            }
        }
    }

    long long nCk(long long n, long long k) {
        long long ret = 1;
        while (n > 0) {  // 下から一桁ずつ計算する
            int ni = n % p;
            int ki = k % p;
            ret *= com[ni][ki];
            ret %= p;
            n /= p;
            k /= p;
        }
        return ret;
    }
};

class CTricolorPyramid {
public:
    void solve(std::istream& cin, std::ostream& cout) {
        int N;
        cin >> N;
        vector<int> C(N);
        REP(i, N) {
            char c;
            cin >> c;
            if (c == 'B') C[i] = 0;
            if (c == 'W') C[i] = 1;
            if (c == 'R') C[i] = 2;
        }

        Comb cb(3);

        int res = 0;
        REP(i, N) {
            res += cb.nCk(N - 1, i) * C[i];
            res %= 3;
        }
        if ((N - 1) % 2 == 1) {
            res *= -1;
        }
        res %= 3;
        if (res < 0) res += 3;
        char ans;
        switch (res) {
            case 0:
                ans = 'B';
                break;
            case 1:
                ans = 'W';
                break;
            case 2:
                ans = 'R';
                break;
        }
        cout << ans << endl;
    }
};

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    std::istream& in(std::cin);
    std::ostream& out(std::cout);

    CTricolorPyramid solver;
    solver.solve(in, out);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); i++)
using ll = long long;
using P = pair<int, int>;

template<class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

int main() {
    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int n, m; cin >> n >> m;
    vector<int> a(m), b(m);
    vector<char> c(m);
    rep(i, m) {
        cin >> a[i] >> b[i] >> c[i];
        a[i]--, b[i]--;
    }
    vector<vector<int>> g(n * n);
    auto to_one = [&](int x, int y) {
        return x * n + y;
    };
    auto to_two = [&](int x) {
        P res = {x / n, x % n};
        return res;
    };
    rep(i, m) {
        rep(j, m) {
            if(c[i] != c[j]) continue;
            g[to_one(a[i], a[j])].push_back(to_one(b[i], b[j]));
            g[to_one(a[i], b[j])].push_back(to_one(b[i], a[j]));
            g[to_one(b[i], a[j])].push_back(to_one(a[i], b[j]));
            g[to_one(b[i], b[j])].push_back(to_one(a[i], a[j]));
        }
    }
    const int INF = 1e9;
    vector<int> dist(n * n, INF);
    queue<int> que;
    rep(i, n) {
        que.push(to_one(i, i));
        dist[to_one(i, i)] = 0;
    }
    rep(i, m) {
        que.push(to_one(a[i], b[i]));
        chmin(dist[to_one(a[i], b[i])], 1);
        que.push(to_one(b[i], a[i]));
        chmin(dist[to_one(b[i], a[i])], 1);
    }
    while(!que.empty()) {
        int now = que.front();
        que.pop();
        for (auto nv : g[now]) {
            int cost = dist[now] + 2;
            if(dist[nv] != INF) continue;
            dist[nv] = cost;
            que.push(nv);
        }
    }
    int ans = min(dist[to_one(0, n - 1)], dist[to_one(n - 1, 0)]);
    cout << (ans == INF ? -1 : ans) << endl;
    return 0;
}

#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define pb push_back
#define all(_obj) _obj.begin(),_obj.end()
#define F first
#define S second
#define pll pair<ll, ll>
#define vll vector<ll>
ll n,m,a,b,c,k,temp,x,y,INF=1e18,s;
const int N=1e5+11,mod=1e9+7;
ll max(ll a,ll b) {return ((a>b)?a:b);}
ll min(ll a,ll b) {return ((a>b)?b:a);}
vll read(int n) {vll v(n);for (int i = 0; i < v.size(); i++)cin>>v[i];return v;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll gcd(ll a, ll b, ll& x, ll& y)
{
    //ax+by=gcd;
    //modular inverse =take gcd with m then (x%m+m)%m;
    if (b == 0)
    {
        x = 1;
        y = 0;
        return a;
    }
    ll x1, y1;
    ll d = gcd(b, a % b, x1, y1);
    x = y1;
    y = x1 - y1 * (a / b);
    return d;
}
void sol(void)
{
cin>>n>>s>>k;
ll rem=n-s;
ll g1=gcd(n,rem,x,y);
ll g2=gcd(g1,k,x,y);
k/=g2;
n/=g2;
rem/=g2;
if(gcd(k,n,x,y)!=1)
cout<<-1<<'\n';
else
cout<<(((x%n+n)%n)*rem)%n<<'\n';
return ;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL),cout.tie(NULL);
    int test=1;
    cin>>test;
    while(test--) sol();
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <tuple>
#include <cstdio>
#include <bitset>
#include <sstream>
#include <iterator>
#include <numeric>
#include <map>
#include <cstring>
#include <set>
#include <functional>
#include <iomanip>

using namespace std;

#define DEBUG_ //!!$BDs=P;~$K%3%a%s%H%"%&%H(B!!
#ifdef DEBUG_
#define dump(x)  cerr << #x << " = " << (x) << endl;
#else
#define dump(x)  ;
#endif

#define equals(a,b) (fabs((a)-(b)) < EPS)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define SZ(x) ((int)(x).size())
#define pb push_back
#define eb emplace_back

//#define int long long

typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

    template <typename T>
std::string printVector(const std::vector<T> &data)
{
    std::stringstream ss;
    std::ostream_iterator<T> out_it(ss, ", ");
    ss << "[";
    std::copy(data.begin(), data.end() - 1, out_it);
    ss << data.back() << "]";
    return ss.str();
}

template <typename T>
void print_array(const T &ary, int size){
    REP(i,size){
        cout << ary[i] << " ";
    }
    cout << endl;
}

const int mod = 1e9+7;
const LL LINF = 1001002003004005006ll;
const int INF = 1001001001;
const double EPS = (1e-10);
const long double PI = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899;
int dx[] = {0,0,-1,1};
int dy[] = {-1,1,0,0};

signed main(int argc, char const *argv[])
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << setprecision(12);

    int N,M;
    cin >> N >> M;
    vector<vector<PII>> yz(N);

    REP(i,M){
        int x,y,z;
        cin >> x >> y >> z;
        x--;
        yz[x].eb(y,z);
    }
    vector<vector<LL>> dp(N+1,VL(1 << N));
    dp[0][0] = 1;
    REP(i,N){
        REP(mask,(1 << N)){
            REP(j,N){
                if((mask >> j) & 1) continue;
                dp[i+1][mask | (1 << j)] += dp[i][mask];
            }
        }

        // check
        REP(mask, (1 << N)){
            bool ok = true;
            for(auto p : yz[i]){
                int y,z;
                tie(y,z) = p;
                int cnt = 0;
                REP(a,y){
                    if((mask >> a) & 1) cnt++;
                }
                if(cnt > z) ok = false;
            }

            if(!ok){
                dp[i+1][mask] = 0;
            }
        }
    }

    //REP(i,N+1){
    //    dump(i)
    //    REP(mask, (1 << N)){
    //        cout << mask << " " << dp[i][mask] << endl;
    //    }
    //}

    LL ans = 0;
    REP(mask, (1 << N)){
        ans += dp[N][mask];
    }
    cout << ans << endl;

}

#include<bits/stdc++.h>
using namespace std;
const int maxn=2e5+5;
typedef long long ll;
const int mod=1e9+7;
ll dp[1<<18][18];
int x[105],y[105],z[105];
int sum[20];
int main(){
    int n,m;
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++){
        scanf("%d%d%d",&x[i],&y[i],&z[i]);
    }
    for(int i=0;i<n;i++)
        dp[1<<i][i]=1;

    for(int s=1;s<(1<<n);s++){
        bool flag=0;
        for(int j=0;j<n;j++){
            sum[j+1]=sum[j]+((s&(1<<j))>0);
        }
        for(int id=1;id<=m;id++){
            if(sum[n]==x[id]){
                if(sum[y[id]]>z[id]){
                    flag=1;break;
                }
            }
        }
        if(flag){
            for(int j=0;j<n;j++)
                if(s&(1<<j))
                dp[s][j]=0;
            continue;
        }

        for(int j=0;j<n;j++){
            if(s&(1<<j)){
                int s1=s^(1<<j);
                for(int k=0;k<n;k++){
                    if(s1&(1<<k)){
                    dp[s][j]+=dp[s1][k];
                    }
                }
            }
        }
    }
    ll ans=0;
    for(int j=0;j<n;j++){
        ans+=dp[(1<<n)-1][j];
    }
    cout<<ans<<endl;

    return 0;
}


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

#define all(s) s.begin(), s.end()
#define pb push_back
#define ii pair<int, int>
#define x first
#define y second
#define bit(x, y) ((x >> y) & 1)

long long C(int n, int k) {
    long long res = 1;
    for (int i = 0; i < k; i++) {
        res *= (n - i);
        res /= (i + 1);
    }
    return res;
}

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

    int l;
    cin >> l;

    cout << C(l - 1, 11) << '\n';

    return 0;
}

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

#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define merge(a,b) a##b
#define mkstr(a) #a
#define flush fflush(stdout);
#define debug(x,y) cout<<#x<<" "<<y<<endl;

typedef long long ll;
typedef long double   ld;
typedef unsigned long long ull;

const long long mod=1e9+7;
const long long inf=1e18;

/************************************TEMPLATE**********************************/

ll modpower(ll x,ll y)
{
  ll res=1;
  x=x%mod;
  if(x==0) return 0;
  while(y>0)
  {
    if(y&1)
      res=(res*x)%mod;
    y=y>>1;
    x=(x*x)%mod;
  }
  return res;
}
/*************************************CODE*************************************/

int main()
{
  fastIO
  ll test_case=1;
  // cin>>test_case;
  while(test_case--)  {
    int x;
    cin>>x;
    if(x<0)  {
      x=0;
    }
    cout<<x<<endl;
  }
  return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
  ll n,x;
  cin>>n>>x;
  x=x*100;
  ll a[n+1],b[n+1];
  ll tol=0;
  ll ans=-1;
  for(ll i=0;i<n;i++)
  {
    cin>>a[i]>>b[i];
    tol+=(a[i]*b[i]);
    if(tol>x&&ans==-1)
    {
      ans=i+1;
    }
  }
  cout<<ans;
  return 0;
}

// 200b.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//

#include <iostream>
#include <vector>
#include <iomanip>

using namespace std;

void solve(){
    double d, h;
    int n;
    cin >> n >> d >> h;
    vector<double> sx(n);
    vector<double> sy(n);

    for (size_t i = 0; i < n; i++)
    {
        cin >> sx[i] >> sy[i];
    }
    double ans = -10000;
    for (size_t i = 0; i < n; i++)
    {
        double y = h - sy[i];
        double x = d - sx[i];
        double a = y / x;
        double b = h - (d * a);
        ans = max(b, ans);
    }
    if (ans < 0)ans = 0;
    cout << std::fixed << std::setprecision(15) << ans << endl;
}

int main()
{
    solve();
    return 0;
}

// プログラムの実行: Ctrl + F5 または [デバッグ] > [デバッグなしで開始] メニュー
// プログラムのデバッグ: F5 または [デバッグ] > [デバッグの開始] メニュー

// 作業を開始するためのヒント:
//    1. ソリューション エクスプローラー ウィンドウを使用してファイルを追加/管理します
//   2. チーム エクスプローラー ウィンドウを使用してソース管理に接続します
//   3. 出力ウィンドウを使用して、ビルド出力とその他のメッセージを表示します
//   4. エラー一覧ウィンドウを使用してエラーを表示します
//   5. [プロジェクト] > [新しい項目の追加] と移動して新しいコード ファイルを作成するか、[プロジェクト] > [既存の項目の追加] と移動して既存のコード ファイルをプロジェクトに追加します
//   6. 後ほどこのプロジェクトを再び開く場合、[ファイル] > [開く] > [プロジェクト] と移動して .sln ファイルを選択します


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define X first
#define Y second
#define eb emplace_back
#ifdef cold66
#define debug(...) do{\
    fprintf(stderr,"LINE %d: (%s) = ",__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<", ";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // cold66
//}
template<class T> inline bool chkmax(T &a, const T &b) { return b > a ? a = b, true : false; }
template<class T> inline bool chkmin(T &a, const T &b) { return b < a ? a = b, true : false; }

const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=0x3f3f3f3f;

int a[5];
int main(){
    IOS();
    int sum = 0;
    for (int i=0;i<4;++i) {
        cin >> a[i];
        sum += a[i];
    }
    bool ok = false;
    for (int i=0;i<4;++i) {
        if (sum - a[i] == a[i]) ok = true;
        for (int j=i+1;j<4;++j) {
            int cur = a[i] + a[j];
            if (cur == sum - cur) ok = true;
        }
    }
    cout << (ok ?"Yes":"No") << endl;
}

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

int main() {
  long long int A, B, C, D;
  cin >>A >> B >>C >> D;
  string ans ="No";

  for (int a=0; a<2; a++){
    for (int b =0; b<2; b++){
      for (int c =0; c<2; c++){
        for(int d =0; d<2; d++){
          if(2*(A*a+B*b+C*c+D*d) == A + B + C+ D){
            ans ="Yes";
          }
        }
      }
    }
  }
  cout << ans << endl;
}


#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#define endl '\n'
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll INF=1e10+1;

vector<int> graph[2001];
bool visit[2001];

void dfs(int root) {
    if(visit[root]) return;
    visit[root]=1;
    for(auto node : graph[root]) {
        dfs(node);
    }
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    //freopen("input.txt","r",stdin);
    int n,m;
    cin>>n>>m;
    for(int i=0;i<m;i++) {
        int a,b;
        cin>>a>>b;
        graph[a].push_back(b);
    }
    int ans=0;
    for(int i=1;i<=n;i++) {
        memset(visit,0,sizeof(visit));
        dfs(i);
        for(int j=1;j<=n;j++) {
            if(visit[j]) ans++;
        }
    }
    cout<<ans;
    return 0;
}

#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const int mod = 1000000007;
//const int mod = 998244353;

int main()
{
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    rep(i, 0, n) cin >> a[i];
    int now = 0;
    set<int> st, stt;
    rep(i, 0, 1500005) stt.insert(i);
    vector<int> mp(1500005);
    int mn = INF;
    rep(i, 0, n - m + 1){
        while(now < i + m){
            if(mp[a[now]] == 0) stt.erase(a[now]);
            if(mp[a[now]] == 0) st.insert(a[now]);
            mp[a[now]]++;
            now++;
        }
        auto it = stt.begin();
        mn = min(mn, (int)*it);
        mp[a[i]]--;
        if(mp[a[i]] == 0){
            stt.insert(a[i]);
            st.erase(a[i]);
        }
    }
    cout << mn << endl;
    return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,b) for(ll i=(a);i<=(b);i++)
#define per(i,a,b) for(ll i=(a);i>=(b);i--)
#define next Cry_For_theMoon
typedef unsigned long long ll;
using namespace std;
const ll MAXN=103,INF=2e18;
ll f[MAXN][MAXN][MAXN];
ll n,a[MAXN],sum;
ll x,ans=INF;
ll calc(ll k){
	ll m=(k-(x-sum)%k)%k; //排除的数之和模k为m
	if(k==n){
		if(m)return INF;
		return (x-sum)/k;
	}
	rep(i,0,n){
		rep(j,0,k){
			f[0][i][j]=INF;
		}
	}
	f[0][0][0]=0;
	rep(i,1,n){
		rep(j,0,n){
			rep(l,0,k){
				f[i][0][l]=INF;
			}
		}
		f[i][0][0]=0;
		rep(j,1,n-k){
			rep(l,0,k-1){
				f[i][j][l]=min(f[i-1][j][l],f[i-1][j-1][(l-a[i]%k+k)%k]+a[i]);
			}
		}
	}
	if(f[n][n-k][m]>1e9)return INF;
	return (x-sum+f[n][n-k][m])/k;
}
int main(){
	cin>>n>>x;
	rep(i,1,n)cin>>a[i],sum+=a[i];
	rep(i,1,n){
		ans=min(ans,calc(i));
	}
	cout<<ans;
	return 0;
}

/*Jai Shree Ram*/
// Never Give Up
#include<bits/stdc++.h>
#include<unordered_map>
using namespace std;

#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define umii            unordered_map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1000000000000000001
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define F(i,s,e,j)        for(int i=s;i<=e;i+=j)
#define mt19937                 rng(chrono::steady_clock::now().tjhe_since_epoch().count());
//shuffle(arr,arr+n,rng)
 void c_p_c()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
int a[100];
int dp[100][101][100];
int minim_time(int idx,int n,int s,int k,int left,int x)
{
	if(left==0)
	{

		if((x-s)%k!=0)
			return inf;
		else
			return (x-s)/k;
	}
	if(idx==n)
		return inf;
	if(dp[idx][left][s]!=-1)
		return dp[idx][left][s];
	int op1 = minim_time(idx+1,n,(s+a[idx])%k,k,left-1,x);
    if(op1!=inf+1)
        op1-=(s+a[idx])/k;

	int op2 = minim_time(idx+1,n,s,k,left,x);
	return dp[idx][left][s] = min(op1,op2);
}
int32_t main()
{
 c_p_c();
 int n,x;
 cin>>n>>x;
 for(int i=0;i<n;i++)
 	cin>>a[i];
 int ans = inf;
for(int k=1;k<=n;k++)
 {
 	memset(dp,-1,sizeof(dp));
 	ans = min(ans,minim_time(0,n,0,k,k,x));
}

 cout<<ans<<endl;
}


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

int main()
{
    int x,y,z;
    int ans;

    cin >> x >> y >> z;

    //  ans/z < y/x
    //  ans < z*y/x
    ans = (y*z)/x;

    if( (ans*1000/z)==(y*1000/x) ) ans--;

    cout << ans << endl;
};

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

#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);
#define VAR(type, ...)type __VA_ARGS__;MACRO_VAR_Scan(__VA_ARGS__); // __VA_ARGS__可変引数マクロ
template<typename T> void MACRO_VAR_Scan(T& t) { std::cin >> t; }
template<typename First, typename...Rest>void MACRO_VAR_Scan(First& first, Rest& ...rest) { std::cin >> first; MACRO_VAR_Scan(rest...); }
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define MAT(type, c, m, n) std::vector<std::vector<type>> c(m, std::vector<type>(n));for(auto& R:c)for(auto& w:R)std::cin>>w;
template<typename T>void MACRO_OUT(const T t) { std::cout << t; }
template<typename First, typename...Rest>void MACRO_OUT(const First first, const Rest...rest) { std::cout << first << " "; MACRO_OUT(rest...); }
#define OUT(...) MACRO_OUT(__VA_ARGS__);
#define FOUT(n, dist) std::cout<<std::fixed<<std::setprecision(n)<<(dist); // std::fixed 浮動小数点の書式 / setprecision 浮動小数点数を出力する精度を設定する。
#define SP std::cout<<" ";
#define BR std::cout<<"\n";
#define SPBR(w, n) std::cout<<(w + 1 == n ? '\n' : ' ');
#define ENDL std::cout<<std::endl;
#define FLUSH std::cout<<std::flush;
#define ALL(a) (a).begin(),(a).end()
#define FOR(w, a, n) for(int w=(a);w<(n);++w)
#define REP(w, n) for(int w=0;w<int(n);++w)
#define IN(a, x, b) (a<=x && x<b)
template<class T> inline T CHMAX(T & a, const T b) { return a = (a < b) ? b : a; }
template<class T> inline T CHMIN(T& a, const T b) { return a = (a > b) ? b : a; }
template<class T> using V = std::vector<T>;
template<class T> using VV = V<V<T>>;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using PAIR = std::pair<int, int>;
using PAIRLL = std::pair<ll, ll>;
constexpr int INFINT = (1 << 30) - 1;                    // 1.07x10^ 9
constexpr int INFINT_LIM = (1LL << 31) - 1;              // 2.15x10^ 9
constexpr ll INFLL = 1LL << 60;                          // 1.15x10^18
constexpr ll INFLL_LIM = (1LL << 62) - 1 + (1LL << 62);  // 9.22x10^18
constexpr double eps = 1e-7;
constexpr int MOD = 1000000007;
constexpr double PI = 3.141592653589793238462643383279;
template<class T, size_t N> void FILL(T(&a)[N], const T & val) { for (auto& x : a) x = val; }   //  int a[5] = {1,2,3,4,5};	FILL(a,10);
template<class ARY, size_t N, size_t M, class T> void FILL(ARY(&a)[N][M], const T & val) { for (auto& b : a) FILL(b, val); }  // ２次元配列でもそのまま使える
template<class T> void FILL(std::vector<T> & a, const T & val) { for (auto& x : a) x = val; }   //	使い方 vector<int> a(3);	FILL(a,10);
template<class ARY, class T> void FILL(std::vector<std::vector<ARY>> & a, const T & val) { for (auto& b : a) FILL(b, val); }  // ２次元配列でもそのまま使える

int main() {
INIT;

VAR(int,x,y,z)
ld ans =  (ld)y / (ld)x * (ld)z;
if(int(ans) == ans)
    OUT(ans -1)
else
    OUT(int(ans))

return 0;
}


#include<iostream>
#include<vector>
#include<set>
#include<queue>
#include<map>
#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<stack>
#include<unordered_map>
#include<bitset>
#include<limits>
#include<complex>
#include<array>
#include<numeric>
#include<functional>
#include<random>

using namespace std;
#define ll long long
#define ull unsigned long long
#define rep(i,m,n) for(ll (i)=(ll)(m);i<(ll)(n);i++)
#define REP(i,n) rep(i,0,n)
#define all(hoge) (hoge).begin(),(hoge).end()
#define llsize(c) ((ll)c.size())
typedef pair<ll, ll> P;

constexpr long double m_pi = 3.1415926535897932L;
constexpr ll MOD = 1000000007;
constexpr ll INF = 1LL << 61;
constexpr long double EPS = 1e-10;
template<typename T> using vector2 = vector<vector<T>>;
template<typename T> using vector3 = vector<vector2<T>>;
typedef vector<ll> Array;
typedef vector<Array> Matrix;
string operator*(const string& s, int k) {
	if (k == 0) return "";
	string p = (s + s) * (k / 2);
	if (k % 2 == 1) p += s;
	return p;
}

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

struct Edge {//グラフ
	int to;
    ll w;
    ll k;
	Edge(int _to, ll _w, ll _k) {
		to = _to; w = _w; k = _k;
	}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;
void add_edge(Graph& G, int from, int to, ll w, ll k) {//最大フロー求める Ford-fulkerson
	G[from].push_back(Edge(to, w, k));
}

Array Dijkstra(Graph& g, ll s) {//O(|E|log|V|)
	Array ret(g.size(), INF);
	ret[s] = 0;
	priority_queue<P, vector<P>, greater<P>> q;
	q.push({ ret[s], s });
	while (!q.empty()) {
		auto [d, v] = q.top();
		q.pop();
		if (ret[v] < d)continue;
		for (auto e : g[v]) {
            ll nret = ret[v] + e.w + (e.k - (ret[v]%e.k)) % e.k;
			if (chmin(ret[e.to], nret)){
                q.push({ ret[e.to], e.to });
            }
		}
	}
	return ret;
}

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

    int N, M;
    cin >> N >> M;
    int S, G;
    cin >> S >> G;
    S--, G--;
    Graph g(N);
    for(int i = 0; i < M; i++){
        int a, b;
        ll t, k;
        cin >> a >> b >> t >> k;
        a--, b--;
        add_edge(g, a, b, t, k);
        add_edge(g, b, a, t, k);
    }
    auto v = Dijkstra(g, S);
    if(v[G] == INF){
        cout << -1 << endl;
    }
    else{
    cout << v[G] << endl;
    }
	return 0;
}


// Author:- Pratik Kinger
// Birla Institute of Technology
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<ll, ll>
#define vi vector<ll>
#define vii vector<pii>
#define mi map<ll, ll>
#define mii map<pii, ll>
#define f(i, a, b) for (ll i = (ll)a; i < (ll)b; i++)
#define rf(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--)
#define FIO                           \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
#define all(a) (a).begin(), (a).end()
#define fi first
#define si second
#define sz(x) (ll) x.size()
#define endl '\n'
#define mod 1000000007
#define mset(m, v) memset(m, v, sizeof(m))
using namespace std;
const ll MOD = 1000000000 + 7;
//------------------------------CODE--HERE--------------------------
//----------global--variables-------------------
//------------end-------------------------------
void solve()
{
    int n;
    cin>>n;
    if(n == 1)
        cout<<0<<endl;
    else
    {
        cout<<n-1<<endl;
    }
}
//------------------------------
int main()
{
    //FAST INPUT OUTPUT
    FIO;

//INPUT OUTPUT
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int t;
    t = 1;
    while (t--)
    {
        solve();
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)

int main()
{
    fastio;
    int n;
    cin>>n;
    cout<<n-1<<"\n";
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
#define ll long long
#define F(type, i, a, b, incr) for (type i = a; i <= (type)(b); i += (type)(incr))
#define RF(type, i, a, b, decr) for (type i = a; i >= (type)(b); i -= (type)(decr))
#define sz(a) sizeof(a)
#define deb(a) cerr << " [" << #a << "->" << a << "] "
#define next_line cerr << '\n'
#define all(a) a.begin(), a.end()
#define iter(it, s) for (auto it = s.begin(); it != s.end(); it++)
#define setbits(x) __builtin_popcountll(x)
using namespace __gnu_pbds;
using namespace std;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
typedef pair<int, int> pii;
typedef pair<ll,ll> pll;

/*
1. If you cannot approach a problem
directly in the way it is proposed
then try to think from backwards
2. Have you checked the implementation
before starting to write the code?
3. Have you read the question carefully ?
4. Keep the names of variable descriptive.
5. Check the types and range of the values properly
6. Erase a iterator in the set or map only after using its value.
7. 1 bitset of 1e9 size only takes 256 mb.
8. Try to use global variables in case of recursion
9. Short and precise exectutes faster
*/
const int MAXN = 1e5 + 1, K = 20;
long long st[MAXN][K + 1];
int Log[MAXN + 1];

void initialize()
{
    Log[1] = 0;
    for (int i = 2; i <= MAXN; i++)
        Log[i] = Log[i / 2] + 1;
}

void preprocess(int N, vector<int> &array)
{
    for (int i = 0; i < N; i++)
        st[i][0] = array[i];

    for (int j = 1; j <= K; j++)
        for (int i = 0; i + (1 << j) <= N; i++)
            st[i][j] = min(st[i][j - 1], st[i + (1 << (j - 1))][j - 1]);
}

int Min(int L, int R)
{
    int j = Log[R - L + 1];
    return min(st[L][j], st[R - (1 << j) + 1][j]);
}

void solve()
{
    int n;
    cin >> n;
    vector<int> arr(n);
    for(int &x: arr)
        cin >> x;
    initialize();
    preprocess(n, arr);
    vector<int> ans(n + 1 , 0);
    F(int, i, 0, n - 1, 1){
        int l = 0, r = i;
        while(l <= r){
            int mid = (l + r) >> 1;
            int cons = Min(mid, i);
            if(cons == arr[i]){
                r = mid - 1LL;
            }else{
                l = mid + 1LL;
            }
        }
        int go_l = r + 1LL;
        l = i, r = n - 1LL;
        while(l <= r){
            int mid = (l + r) >> 1;
            int cons = Min(i, mid);
            if(cons == arr[i]){
                l = mid + 1LL;
            }else{
                r = mid - 1LL;
            }
        }
        int go_r = l - 1LL;
        ans[go_r - go_l + 1LL] = max(ans[go_r - go_l + 1LL], arr[i]);
    }
    int ac = 0;
    F(int, l, 1, n, 1){
        ac = max(ac, ans[l] * l);
    }
    cout << ac;
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    #ifndef ONLINE_JUDGE
        // freopen("input.txt", "r", stdin);
        // freopen("output.txt", "w", stdout);
        // freopen("Debug.txt", "w", stderr);
    #else
    #endif
    // cout << fixed << setprecision(10);
    // int _t;
    // cin>>_t;
    // while(_t --)
        solve();
}

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

const int MAX_N = 1e4+2;
int n;
ll a[MAX_N];

void solve()
{
  ll ans = 0;
  for(int i=0;i<n;++i){
  	ll mi = 1e6;
    for(int j=i;j<n;++j){
    	mi=min(mi, a[j]);
      	ans=max(ans,1LL*(j-i+1)*mi);
    }
  }
  cout<<ans<<'\n';
}

int main()
{
	cin >> n;
  	for(int i=0;i<n;++i)cin >> a[i];
  	solve();
  	return 0;
}


#include <bits/stdc++.h>

using namespace std;

//begin of def
#define fastio ios_base::sync_with_stdio(false);cin.tie(0)
#define endl '\n'

using lli = long long int;
using ulli = unsigned long long int;
using Ld = long double;
using pii = pair<int, int>;
using pll = pair<lli, lli>;
using pld = pair<Ld, Ld>;
#define X first
#define Y second

#define rep(I, S, E) for(int I = (S); I < (E); I++)
#define repq(I, S, E) for(int I = (S); I <= (E); I++)

#define pb push_back
#define epb emplace_back

#define ALL(X) X.begin(), X.end()
//end of def

vector<lli> v;

int main(){
    fastio;
    vector<lli> p;
    lli test = 1;
    repq(i, 2, 50){
        bool f = true;
        rep(j, 2, i){
            if(i % j == 0){
                f = false;
                break;
            }
        }
        if(f){
            p.pb(i);
            test *= i;
        }
    }
    v.resize(p.size());

    int n;
    cin >> n;
    rep(i, 0, n){
        int k;
        cin >> k;
        rep(j, 0, p.size()){
            if(k % p[j] == 0)
                v[j] |= (1LL << i);
        }
    }
    lli mn = 4e18;
    rep(t, 1, 1LL << p.size()){
        lli x = 0, mul = 1;
        rep(j, 0, p.size()){
            if(t & (1LL << j)){
                x |= v[j];
                mul *= p[j];
            }
        }
        if(x == (1LL << n) - 1){
            mn = min(mn, mul);
        }
    }
    cout << mn;

    return 0;
}

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

unsigned long long p[] = {0, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}, n, a[55];

unsigned long long ans = 614889782588491410LL;

void dfs(unsigned long long x, unsigned long long y){
    if(x > 15){
        unsigned long long ret = 0;
        for(unsigned long long i = 1; i <= n; i++) ret += __gcd(1LL * a[i], y) > 1;
        if(ret == n) ans = min(ans, y);
        return;
    }
    y *= p[x], dfs(x + 1, y), y /= p[x], dfs(x + 1, y);
}

int main(){
    cin >> n;
    for(unsigned long long i = 1; i <= n; i++) cin >> a[i];
    dfs(1, 1LL);
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>
#define lg long long int
#define loop(i, s, e) for (lg i = s; i <= e; i++)
#define iloop(i, s, e) for (lg i = e; i >= s; i--)
#define pb push_back
#define mp make_pair
#define mod 1000000007
using namespace std;

lg min(lg a, lg b)
{
	return a < b ? a : b;
}
lg max(lg a, lg b)
{
	return a > b ? a : b;
}
lg lcm(lg a, lg b)
{
	return (a * b) / __gcd(a, b);
}
lg ans = 0;
lg n, m;
bool sortfn(vector<lg> &a, vector<lg> &b)
{
	return a[0] > b[0];
}

lg sol(vector<string> &grid, vector<vector<lg>> &dp, lg i, lg j)
{
	if (i == n - 1 && j == m - 1)
		return 1;
	else if (dp[i][j] != -1)
		return dp[i][j];
	else
	{
		lg total = 0;
		for (lg in = i + 1; i < n; i++)
		{
			if (grid[in][j] == '#')
				break;
			total += sol(grid, dp, in, j);
			total %= mod;
		}
		for (lg jn = j + 1; j < m; j++)
		{
			if (grid[i][jn] == '#')
				break;
			total += sol(grid, dp, i, jn);
			total %= mod;
		}
		for (lg k = 1; k < min(n - i, m - j); k++)
		{
			if (grid[i + k][j + k] == '#')
				break;
			total += sol(grid, dp, i + k, j + k);
			total %= mod;
		}
		dp[i][j] = total % mod;
		return dp[i][j];
	}
}
vector<lg> nums(11, 0);
bool possible(lg n)
{
	string s = to_string(n);
	vector<lg> local(11, 0);
	for (lg i = 0; i < s.length(); i++)
	{
		if(s[i] - 48 == 0) return false;
		local[s[i] - 48]++;
	}
	local[0]+=max(3-s.length(),0);
	for (lg i = 0; i < 10; i++)
	{
		if (local[i] > nums[i])
			return false;
	}
	return true;
}

int main()
{
	string s;
	cin >> s;
	lg l = s.length();
	for (lg i = 0; i < l; i++)
	{
		nums[s[i] - 48]++;
	}
	nums[0]+=max(3-s.length(),0);
	bool poss = false;
	for (lg i = 0; i < 1000; i += 8)
	{
		if (possible(i))
		{
			poss = true;
			break;
		}
	}
	if (poss)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}

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

string s;
int f[10];

int main() {
	ios::sync_with_stdio(0);

	cin >> s;

	memset(f, 0, sizeof(f));
	for(int i = 0; i < s.size(); i++)
		f[s[i] - '0']++;

	if(s.size() == 2) {
		int d1 = (s[0] - '0') * 10 + (s[1] - '0');
		int d2 = (s[1] - '0') * 10 + (s[0] - '0');
		if(d1 % 8 == 0 || d2 % 8 == 0)
			cout << "Yes" << endl;
		else cout << "No" << endl;
		return 0;
	}
	if(s.size() == 1) {
		if(s == "8")
			cout << "Yes" << endl;
		else cout << "No" << endl;
		return 0;
	}

	for(int i = 112; i < 1000; i += 8) {
		int d1 = i / 100;
		int d2 = i / 10 % 10;
		int d3 = i % 10;

		int t[10];
		for(int i = 0; i <= 9; i++)
			t[i] = f[i];
		if(t[d1] > 0) t[d1]--;
		else continue;
		if(t[d2] > 0) t[d2]--;
		else continue;
		if(t[d3] <= 0) continue;

		cout << "Yes" << endl;
		return 0;
	}
	cout << "No" << endl;
	return 0;
}


// Problem : C - Collinearity
// Contest : AtCoder - AtCoder Beginner Contest 181
// URL : https://atcoder.jp/contests/abc181/tasks/abc181_c
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define eb emplace_back
#define pb push_back
#define size(s) (int)s.size()
#define int long long
#define INF 1000000000000000000
#define vi vector<int>
#define vs vector<string>
#define vv vector<vector<int>>
#define pii pair<int,int>
#define m_p(x,y) make_pair(x,y)
#define vp vector<pair<int,int>>
#define setbits(x) __builtin_popcountll(x)
#define f first
#define se second
#define inc(v,n,x) v.assign(n,x)
#define incd(v,n) v.resize(n)
#define iniz(n) memset(n,0,sizeof(n))
#define inin(n) memset(n,-1,sizeof(n))
#define inimi(n) memset(n,0xc0,sizeof(n))
#define inima(n) memset(n,0x3f,sizeof(n))
#define all(v) (v).begin(),(v).end()

using namespace std;

template<typename T1,typename T2>istream &operator>>(istream &is, vector<pair<T1,T2>> &v) { for (pair<T1,T2> &t : v) is >> t.f>>t.se; return is; }
template<typename T>istream &operator>>(istream &is, vector<T> &v) { for (T &t : v) is >> t; return is; }
template<typename T>ostream &operator<<(ostream &os, const vector<T> &v) { for (const T &t : v) {os << t <<" ";} os << '\n'; return os; }

double pi=acos(-1.0);
int md=1e9+7;
int dx1[]={0,0,-1,1};
int dy1[]={1,-1,0,0};
const int N=3e5+5;

template<class T>
T abst(T a)
{return a<0?-a:a;}

void solve()
{
	int n;cin>>n;
	vp v(n);cin>>v;
	bool b=false;
	//x1 (y2  - y3) + x2 (y3 - y1) + x3 (y1 - y2) =0
	for(int i=0;i<n;i++)
	{
		for(int j=i+1;j<n;j++)
		{
			for(int k=j+1;k<n;k++)
			{
				if(v[i].f*(v[j].se-v[k].se)+v[j].f*(v[k].se-v[i].se)+v[k].f*(v[i].se-v[j].se)==0)
				b=true;
			}
		}
	}
	if(b)
	cout<<"Yes";
	else
	cout<<"No";
}

int32_t main(){
ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
int t=1;
//cin>>t;
for(int i=1;i<=t;i++)
{
    solve();
}
return 0;
}

#include <algorithm>
#include <iostream>
#include <map>
#include <memory>
#include <string>
#include <vector>

#include "float.h"

#define rep(inc, bgn, end) for (int inc = bgn; inc < end; ++inc)
#define repe(inc, bgn, end) for (int inc = bgn; inc <= end; ++inc)

#define INT_MAX 1000000000

using ll = long long;
using namespace std;

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

    struct Point {
        int x;
        int y;
    };

    vector<Point> points(N);

    rep(idx, 0, N) {
        cin >> points[idx].x >> points[idx].y;
    }

    rep(fstIdx, 0, N) {
        Point fstVal = points[fstIdx];
        rep(scdIdx, fstIdx + 1, N) {
            Point scdVal = points[scdIdx];
            rep(thdIdx, scdIdx + 1, N) {
                Point thdVal = points[thdIdx];
                auto level1 = fstVal.x == scdVal.x
                                  ? FLT_MAX
                                  : (fstVal.y - scdVal.y) / (float)(fstVal.x - scdVal.x);
                auto level2 = fstVal.x == thdVal.x
                                  ? FLT_MAX
                                  : (fstVal.y - thdVal.y) / (float)(fstVal.x - thdVal.x);
                if (level1 == level2) {
                    cout << "Yes" << endl;
                    return 0;
                }
            }
        }
    }

    cout << "No" << endl;

    return 0;
}


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

int main()
{
    int n;
    double d,h;
    cin>>n>>d>>h;

    double x[n];
    double y[n];
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }

    double ymin=INT_MAX;
    for(int i=0;i<n;i++)
    {
        bool nope=false;
        double yc;
        for(int j=0;j<n;j++)
        {
            yc=((h-y[i])/(d-x[i]))*(x[j]-x[i]) + y[i];
            if(yc-y[j] < 0){
                nope=true;
                break;
            }
        }
        if(!nope)
        {
            yc=y[i]-((h-y[i])/(d-x[i]))*(x[i]);
            if(ymin>yc)
                ymin=yc;
        }
    }
    if(ymin<0)
        ymin=0.0;
    cout<<ymin<<endl;
}

#include<bits/stdc++.h>
#define pb push_back
#define endl ("\n")
#define mp make_pair
#define lb lower_bound
#define int long long
#define up upper_bound
#define M  1000000007LL
#define yy cout<<"Yes"<<endl;
#define nn cout<<"No"<<endl;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define mod 1000000007
using namespace std;

int32_t main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    t = 1;
    //  cin >> t;

    while (t--)
    {
        int n, du, hu;
        cin >> n >> du >> hu;
        int d[n], h[n];
        double ans = M;
        rep(i, 0, n)
        {
            cin >> d[i] >> h[i];
            ans = min(ans, (hu - h[i]) / (du - d[i] + 0.0));

        }
        cout << (max(0.0, hu - ans * du));

    }
    return 0;
}


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

#define for0(i, n) for (int i = 0; i < (int)(n); i++)
#define for1(i, n) for (int i = 1; i <= (int)(n); i++)
#define forc(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i)
#define forr0(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define forr1(i, n) for (int i = (int)(n); i >= 1; --i)
#define deb(x) cout << #x << "=" << x << endl
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define sortall(x) sort(all(x))
#define tr(x) for(auto it = x.begin(); it != x.end(); it++)
#define fast ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define printclock cerr<< "Time : "<< 1000*(ld) clock()/(ld)CLOCKS_PER_SEC<< "ms\n";
#define READ(f) freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)
#define inf 1e18
#define mod 1e9 + 7

void dk_98() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}

long long lpf[1000001], mobius[1000001];
void least_prime_factor()
{
    for (long long i = 2; i <= 1000000; i++)
        if (!lpf[i])
            for (long long j = i; j <= 1000000; j += i)
                if (!lpf[j]) lpf[j] = i;
}
void Mobius()
{
    for (long long i = 1; i <= 1000000; i++) {
        if (i == 1)
            mobius[i] = 1;
        else {
            if (lpf[i / lpf[i]] == lpf[i])
                mobius[i] = 0;
            else
                mobius[i] = -1 * mobius[i / lpf[i]];
        }
    }
}
long long gcd_pairs(long long a[], long long n)
{
    long long maxi = 0;
    long long fre[1000001] = { 0 };
    for (long long i = 0; i < n; i++) {
        fre[a[i]]++;
        maxi = max(a[i], maxi);
    }
    least_prime_factor();
    Mobius();
    long long ans = 0;
    for (long long i = 1; i <= maxi; i++) {
        if (!mobius[i])
            continue;
        long long temp = 0;
        for (long long j = i; j <= maxi; j += i)
            temp += fre[j];
        ans += temp * (temp - 1) / 2 * mobius[i];
    }
    return ans;
}

void solve() {
    long long l, r; cin >> l >> r;
    long long a[r - l + 1];
    for (long long i = l; i <= r; i++) a[i - l] = i;
    long long val = gcd_pairs(a, r - l + 1);
    val *= 2;
    long long n = r - l + 1;
    long long total = n * n - n;
    total -= val;
    for (long long i = l; i <= r; i++) {
        if (i == 1) continue;
        long long what = r / i;
        total -= (what - 1) * 2;
    }
    cout << total << '\n';
}

int main() {
    fast;
    dk_98();
    int t = 1; //cin >> t;
    while (t--) {
        solve();
    }
}

#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<iomanip>
#include<regex>
using namespace std;
#define int long long
const int mod=1e9+7;
bool pri[1000001],squf[1000001],even[1000001];
signed main(){
	int l,r;
	cin>>l>>r;
	for(int i=2;i<=r;i++)
		pri[i]=squf[i]=even[i]=1;
	for(int i=2;i<=r;i++){
		if(!pri[i])
			continue;
		for(int j=i;j<=r;j+=i){
			if(j!=i)
				pri[j]=0;
			even[j]=!even[j];
		}
		for(int j=i*i;j<=r;j+=i*i)
			squf[j]=0;
	}
	int ans1=0,ans2=0;
	for(int g=2;g<=r;g++){
		if(!squf[g])
			continue;
		int a=r/g-(l-1)/g;
		a=a*(a-1)/2;
		if(even[g])
			ans1-=a;
		else
			ans1+=a;
	}
	for(int g=max(2ll,l);g<=r;g++)
		ans2+=r/g-1;
	cout<<(ans1-ans2)*2<<endl;
}


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

int main()
{
    string s;
    cin >> s;
    int ans = 0;

    const std::string find_word("ZONe");
    std::string::size_type pos = s.find(find_word);
    while (pos != std::string::npos)
    {
        ans++;
        // std::cout << pos << std::endl;
        pos = s.find(find_word, pos + find_word.length());
    }
    cout << ans << endl;

}

#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long int ll;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for(auto it = d.b;it != d.e;++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

ll binom(ll n, ll k){
  if(k == 0)return 1;
  vector<bool> down(12, false);
  ll up = 1;
  for(ll i = n;i > k;i--){
    up *= i;
    for(ll j = 2;j <= 11;j++){
      if(!down[j] && up % j == 0){
        up /= j;
        down[j] = true;
      }
    }
  }
  for(ll i = 2;i <= 11;i++){
    if(down[i])continue;
    up /= i;
  }
  return up;
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  ll n;cin >> n;
  cout << binom(n - 1, n - 12) << endl;
}


#include <bits/stdc++.h>

#define int long long
using namespace std;
const int mod = 10;
const int MAX=1e6+10;
const int INF=0x3f3f3f3f;

int fastPow(int a,int n){
    int base=a;
    int res=1;
    while(n){
        if(n&1){
            res=(base*res)%4;
        }
        base=(base*base)%4;
        n=n>>1;
    }
    return res;
}
int a2[10]={0,2,4,8,6};
int a3[10]={0,3,9,7,1};
int a7[10]={0,7,9,3,1};
int a8[10]={0,8,4,2,6};
void solve() {
    int a,b,c;
    cin>>a>>b>>c;
    a=a%10;
    if(a==0||a==1||a==5||a==6){
        cout<<a;
        return;
    }
    if(a==2||a==3||a==7||a==8){
        int yu=fastPow(b,c);
        if(yu==0)yu=4;
        if(a==2){
            cout<<a2[yu];
        }
        if(a==3){
            cout<<a3[yu];
        }
        if(a==7){
            cout<<a7[yu];
        }
        if(a==8){
            cout<<a8[yu];
        }

    }
    if(a==4||a==9){
        if(a==4){
            if(b%2==0){
                cout<<6;
            }else{
                cout<<4;
            }
        }
        if(a==9){
            if(b%2==0){
                cout<<1;
            }else{
                cout<<9;
            }
        }
    }

}

signed main() {
    //ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int _ = 1;
    //cin >> _;
    while (_--) {
        solve();
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define all(x) (x).begin(),(x).end()
#define SIZE(x) ll(x.size())
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
typedef long long ll;
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
typedef pair<int, int> P;
int main()
{
    ll N, X;
    cin >> N >> X;
    ll res = 0;
    X *= 100;
    int ans = 0;
    rep(i, N) {
        ll V, P;
        cin >> V >> P;
        res += V * P;
        ans++;
        if (X < res) {
            cout << ans << endl;
            return 0;
        }
    }

    cout << -1 << endl;

    return 0;
}

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

int32_t main() {

#ifndef ONLINE_JUDGE
	freopen("input.in", "r", stdin);
	freopen("output.in", "w", stdout);
#endif

	int n, k;

	cin >> n >> k;
	int cnt = 0;
	int ml = 0;
	vector<pair<int, int>> vp;
	for (int i = 0; i < n; i++) {
		int v, p;
		cin >> v >> p;
		vp.push_back(make_pair(v, p));
	}
	k *= 100;
	for (int i = 0; i < n; i++) {
		int v, p;
		v = vp[i].first, p = vp[i].second;
		v *= p;
		ml += v;
		cnt++;
		if (ml > k) {
			cout << cnt << "\n";
			return 0;
		}
	}
	cout << "-1\n";

	return 0;
}


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

#ifdef LOCAL
#include <debugger.h>
#else
#define dbg(x...) {}
#define dbg_t()   {}
#endif

using ll = long long;
using ld = long double;

const ll INF = 1e18;

void solve()
{
  vector<vector<ll>> dp(64, vector<ll>(64, -1));
  function<ll(ll, ll)> ncr = [&](ll n, ll r)
  {
    if (r > n)
      return 0ll;

    if (n == 0)
      return 0ll;

    if (r == 0)
      return 1ll;

    if (n == r)
      return 1ll;

    if (dp[n][r] != -1)
      return dp[n][r];

    ll ans = 0;
    ans += ncr(n - 1, r);
    ans += ncr(n - 1, r - 1);
    return dp[n][r] = ans;
  };
  ll a, b, k; cin >> a >> b >> k;
  string ans;
  ll t = a + b;
  for (ll i = 0; i < t; i++)
  {
    if (a == 0)
    {
      ans += 'b';
      b--;
    }
    else if (b == 0)
    {
      ans += 'a';
      a--;
    }
    else
    {
      if (ncr(a + b - 1, a - 1) >= k)
      {
        ans += 'a';
        a--;
      }
      else
      {
        ans += 'b';
        k -= ncr(a + b - 1, a - 1);
        b--;
      }
    }
  }
  cout << ans << "\n";
}

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

#ifdef LOCAL
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif

  ll _t = 1;
  // cin >> _t;
  for (ll i = 1; i <= _t; i++)
  {
    // cout << "Case #" << i << ": ";
    solve();
  }

  dbg_t();

  return 0;
}

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

#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for(int i = (int)(a); i <= (int)(b); ++i)
#define FORR(i, a, b) for(int i = (int)(a); i >= (int)(b); --i)
#define ALL(c) (c).begin(), (c).end()

using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
using VD = vector<double>;
using VII = vector<VI>;
using VLL = vector<VL>;
using VDD = vector<VD>;
using P = pair<int, int>;
using PL = pair<ll, ll>;

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

ll get_count(ll N, ll x, VL& sum_two) {
  ll count = 0;
  FOR(i, 1, N) {
    if(i >= x) break;
    count += sum_two[x - i];
  }
  return count;
}

void solve(long long N, long long K) {
  VL count_two(3 * N + 1, 0);
  VL sum_two(3 * N + 2, 0);
  FOR(i, 2, 3 * N) {
    count_two[i] = max(0ll, min(N, ll(i - 1)) - max(1ll, ll(i - N)) + 1ll);
  };
  FOR(i, 2, 3 * N) {
    sum_two[i + 1] += sum_two[i] + count_two[i];
  }
  ll ok = 0;
  ll ng = 3 * N + 1;
  while(abs(ok - ng) > 1) {
    ll mid = (ok + ng) / 2;
    if(get_count(N, mid, sum_two) < K) {
      ok = mid;
    } else {
      ng = mid;
    }
  }
  K -= get_count(N, ok, sum_two);
  ll x = 1, y = 1, z = 1;
  ll tmp_count = 0;
  FOR(i, 1, N) {
    if(tmp_count + count_two[ok - i] >= K) {
      K -= tmp_count;
      x = i;
      break;
    }
    tmp_count += count_two[ok - i];
  }
  tmp_count = 0;
  FOR(i, 1, N) {
    if(ok - x - i >= 1 && ok - x - i <= N) tmp_count++;
    if(tmp_count == K) {
      y = i;
      break;
    }
  }
  z = ok - x - y;
  cout << x << " " << y << " " << z << endl;
}

int main() {
  long long N;
  scanf("%lld", &N);
  long long K;
  scanf("%lld", &K);
  solve(N, K);
  return 0;
}


#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

using namespace std;
using i64 = int64_t;
#define rep(i, s, n) for (i64 i = (s); i < (n); ++i)

void run() {
  i64 a1, a2, a3, a4;
  cin >> a1 >> a2 >> a3 >> a4;
  cout << min(min(a1, a2), min(a3, a4)) << endl;
}

int main() {
  cin.tie(nullptr);
  cout.precision(std::numeric_limits<double>::max_digits10);
  run();
  return 0;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;

#define SZ(x)                       (int) x.size()
#define F                           first
#define S                           second

const int N = 1e6 + 10, MOD = 1e9 + 7;

int main() {
    int a, b, c, d; scanf("%d%d%d%d", &a, &b, &c, &d);
    printf("%d\n", min({a, b, c, d}));
    return 0;
}