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

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

#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int N = 100100;

int sa[N], ea[N], sb[N], eb[N], n;
vector<pair<int, pii> > data;
multiset<int> ls, rs;

void no()
{
	cout << "NO";
	exit(0);
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> sa[i] >> ea[i] >> sb[i] >> eb[i];
		data.pb({sa[i], {-1, i}});
		data.pb({ea[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(eb[ind]);
			if (it != ls.end()) no();
			it = rs.lower_bound(sb[ind]);
			if (!rs.empty() && it != rs.begin()) no();
			ls.insert(sb[ind]);
			rs.insert(eb[ind]);
		} else {
			ls.erase(ls.find(sb[ind]));
			rs.erase(rs.find(eb[ind]));
		}
	}
	data.clear();
	ls.clear();
	rs.clear();
	for (int i = 0; i < n; i++) {
		data.pb({sb[i], {-1, i}});
		data.pb({eb[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(ea[ind]);
			if (it != ls.end()) no();
			it = rs.lower_bound(sa[ind]);
			if (!rs.empty() && it != rs.begin()) no();
			ls.insert(sa[ind]);
			rs.insert(ea[ind]);
		} else {
			ls.erase(ls.find(sa[ind]));
			rs.erase(rs.find(ea[ind]));
		}
	}
	cout << "YES";
}


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

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

#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int N = 100100;

int sa[N], ea[N], sb[N], eb[N], n;
vector<pair<int, pii> > data;
multiset<int> ls, rs;

void no()
{
	cout << "NO";
	exit(0);
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> sa[i] >> ea[i] >> sb[i] >> eb[i];
		data.pb({sa[i], {-1, i}});
		data.pb({ea[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(eb[ind]);
			if (it != ls.end()) no();
			it = rs.upper_bound(sb[ind]);
			if (!rs.empty() && it != rs.begin()) no();
			ls.insert(sb[ind]);
			rs.insert(eb[ind]);
		} else {
			ls.erase(ls.find(sb[ind]));
			rs.erase(rs.find(eb[ind]));
		}
	}
	data.clear();
	ls.clear();
	rs.clear();
	for (int i = 0; i < n; i++) {
		data.pb({sb[i], {-1, i}});
		data.pb({eb[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(ea[ind]);
			if (it != ls.end()) no();
			it = rs.upper_bound(sa[ind]);
			if (!rs.empty() && it != rs.begin()) no();
			ls.insert(sa[ind]);
			rs.insert(ea[ind]);
		} else {
			ls.erase(ls.find(sa[ind]));
			rs.erase(rs.find(ea[ind]));
		}
	}
	cout << "YES";
}


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

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

#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int N = 100100;

int sa[N], ea[N], sb[N], eb[N], n;
vector<pair<int, pii> > data;
set<int> ls, rs;
set<int> open;

int main()
{
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf(" %d%d%d%d", sa + i, ea + i, sb + i, eb + i);
		data.pb({sa[i], {-1, i}});
		data.pb({ea[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(eb[ind]);
			if (it != ls.end()) return cout << "NO", 0;
			it = rs.upper_bound(sb[ind]);
			if (!rs.empty() && it != rs.begin()) return cout << "NO", 0;
			open.insert(ind);
			ls.insert(sb[ind]);
			rs.insert(eb[ind]);
		} else {
			open.erase(ind);
			ls.erase(ls.find(sb[ind]));
			rs.erase(rs.find(eb[ind]));
		}
	}
	data.clear();
	open.clear();
	ls.clear();
	rs.clear();
	for (int i = 0; i < n; i++) {
		data.pb({sb[i], {-1, i}});
		data.pb({eb[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(ea[ind]);
			if (it != ls.end()) return cout << "NO", 0;
			it = rs.upper_bound(sa[ind]);
			if (!rs.empty() && it != rs.begin()) return cout << "NO", 0;
			open.insert(ind);
			ls.insert(sa[ind]);
			rs.insert(ea[ind]);
		} else {
			open.erase(ind);
			ls.erase(ls.find(sa[ind]));
			rs.erase(rs.find(ea[ind]));
		}
	}
	cout << "YES";
}


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

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

#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int N = 100100;

int sa[N], ea[N], sb[N], eb[N], n;
vector<pair<int, pii> > data;
multiset<int> ls, rs;

void no()
{
	printf("NO");
	exit(0);
}

int main()
{
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf(" %d%d%d%d", sa + i, ea + i, sb + i, eb + i);
		data.pb({sa[i], {-1, i}});
		data.pb({ea[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(eb[ind]);
			if (it != ls.end()) no();
			it = rs.lower_bound(sb[ind]);
			if (!rs.empty() && it != rs.begin()) no();
			ls.insert(sb[ind]);
			rs.insert(eb[ind]);
		} else {
			ls.erase(ls.find(sb[ind]));
			rs.erase(rs.find(eb[ind]));
		}
	}
	data.clear();
	ls.clear();
	rs.clear();
	for (int i = 0; i < n; i++) {
		data.pb({sb[i], {-1, i}});
		data.pb({eb[i], {1, i}});
	}
	sort(all(data));
	for (int i = 0; i < data.size(); i++) {
		int ind = data[i].S.S, type = data[i].S.F;
		if (type == -1) {
			auto it = ls.upper_bound(ea[ind]);
			if (it != ls.end()) no();
			it = rs.lower_bound(sa[ind]);
			if (!rs.empty() && it != rs.begin()) no();
			ls.insert(sa[ind]);
			rs.insert(ea[ind]);
		} else {
			ls.erase(ls.find(sa[ind]));
			rs.erase(rs.find(ea[ind]));
		}
	}
	printf("YES");
}


#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<pair<pair<int, int>, int> >a, b;
vector<int>cnta, cntb;
void reject(){printf("NO\n"); exit(0);}
void accept(){printf("YES\n"); exit(0);}
int main(){
	int n; scanf("%d", &n);
	a.resize(n); b.resize(n);
	cnta.resize(n); cntb.resize(n);
	for(int i=0; i<n; i++){
		scanf("%d%d%d%d", &a[i].first.first, &a[i].first.second, &b[i].first.first, &b[i].first.second);
		a[i].second=i; b[i].second=i;
	}
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	for(int i=0; i<n; i++){
		int lf=a[i].first.first;
		int rg=a[i].first.second;
		int idx=a[i].second;
		int ub=upper_bound(a.begin(), a.end(), mp(mp(rg, INT_MAX), INT_MAX))-a.begin();
		int lb=upper_bound(a.begin(), a.end(), mp(mp(lf, -1), -1))-a.begin();
		cnta[idx]=n-ub+lb;
	}
	for(int i=0; i<n; i++){
		int lf=b[i].first.first;
		int rg=b[i].first.second;
		int idx=b[i].second;
		int ub=upper_bound(b.begin(), b.end(), mp(mp(rg, INT_MAX), INT_MAX))-b.begin();
		int lb=upper_bound(b.begin(), b.end(), mp(mp(lf, -1), -1))-b.begin();
		cntb[idx]=n-ub+lb;
	}
	for(int i=0; i<n; i++){
	//	cout<<cnta[i]<<" "<<cntb[i]<<endl;
		if(cnta[i]!=cntb[i]) reject();
	}
	accept();
}


#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<pair<pair<int, int>, pair<int, int> > >a, b;
map<int, vector<int> >posA, posB;
vector<pair<int, int> >rangeA, rangeB;
void reject(){printf("NO\n"); exit(0);}
void accept(){printf("YES\n"); exit(0);}
bool sect(pair<int, int>x, pair<int, int>y){
//	cout<<x.first<<" "<<x.second<<" "<<y.first<<" "<<y.second<<endl;
	if(x.first<y.second) return false;
	if(x.second>y.first) return false;
	return true;
}
int main(){
	int n; scanf("%d", &n);
	a.resize(n); b.assign(n, mp(mp(-1, -1), mp(-1, -1)));
	for(int i=0; i<n; i++)
		scanf("%d%d%d%d", &a[i].first.first, &a[i].first.second, &a[i].second.first, &a[i].second.second);
	for(int i=0; i<n; i++){
		posA[a[i].first.first].push_back(i);
		posA[a[i].first.second].push_back(i);
	}
	for(int i=0; i<n; i++){
		posB[a[i].second.first].push_back(i);
		posB[a[i].second.second].push_back(i);
	}
	int cnt=0;
	for(auto i:posA){
		vector<int>isi=i.second;
		int mn=cnt+1;
		for(int j:isi){
			cnt++;
			if(b[j].first.first==-1) b[j].first.first=cnt;
			else b[j].first.second=cnt;
		}
		int mx=cnt;
		rangeA.push_back({mx, mn});
	}
	cnt=0;
	for(auto i:posB){
		vector<int>isi=i.second;
		int mn=cnt+1;
		for(int j:isi){
			cnt++;
			if(b[j].second.first==-1) b[j].second.first=cnt;
			else b[j].second.second=cnt;
		}
		int mx=cnt;
		rangeB.push_back({mx, mn});
	}
	for(int i=0; i<n; i++){
		int Ll=b[i].first.first;
		int Lr=b[i].first.second;
		int Rl=b[i].second.first;
		int Rr=b[i].second.second;
		int ill=lower_bound(rangeA.begin(), rangeA.end(), mp(Ll, Ll))-rangeA.begin();
		int ilr=lower_bound(rangeA.begin(), rangeA.end(), mp(Lr, Lr))-rangeA.begin();
		int irl=lower_bound(rangeB.begin(), rangeB.end(), mp(Rl, Rl))-rangeA.begin();
		int irr=lower_bound(rangeB.begin(), rangeB.end(), mp(Rr, Rr))-rangeA.begin();
		pair<int, int>ll=rangeA[ill];
		pair<int, int>lr=rangeA[ilr];
		pair<int, int>rl=rangeA[irl];
		pair<int, int>rr=rangeA[irr];
		bool ok1=sect(ll, rl), ok2=sect(lr, rr);
		if(!ok1 || !ok2) reject();
	}
	accept();
}


#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<pair<pair<int, int>, int> >a, b;
vector<pair<int, int> >cnta, cntb;
void reject(){printf("NO\n"); exit(0);}
void accept(){printf("YES\n"); exit(0);}
int main(){
	int n; scanf("%d", &n);
	a.resize(n); b.resize(n);
	cnta.resize(n); cntb.resize(n);
	for(int i=0; i<n; i++){
		scanf("%d%d%d%d", &a[i].first.first, &a[i].first.second, &b[i].first.first, &b[i].first.second);
		a[i].second=i; b[i].second=i;
	}
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	for(int i=0; i<n; i++){
		int lf=a[i].first.first;
		int rg=a[i].first.second;
		int idx=a[i].second;
		int ub=upper_bound(a.begin(), a.end(), mp(mp(rg, INT_MAX), INT_MAX))-a.begin();
		int lb=upper_bound(a.begin(), a.end(), mp(mp(lf, -1), -1))-a.begin();
		cnta[idx]={n-ub, lb};
	}
	for(int i=0; i<n; i++){
		int lf=b[i].first.first;
		int rg=b[i].first.second;
		int idx=b[i].second;
		int ub=upper_bound(b.begin(), b.end(), mp(mp(rg, INT_MAX), INT_MAX))-b.begin();
		int lb=upper_bound(b.begin(), b.end(), mp(mp(lf, -1), -1))-b.begin();
		cntb[idx]={n-ub, lb};
	}
	for(int i=0; i<n; i++){
	//	cout<<cnta[i]<<" "<<cntb[i]<<endl;
		if(cnta[i].first!=cntb[i].first || cnta[i].second!=cntb[i].second) reject();
	}
	accept();
}


#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<pair<pair<int, int>, int> >a, b;
vector<int>cnta, cntb;
void reject(){printf("NO\n"); exit(0);}
void accept(){printf("YES\n"); exit(0);}
int main(){
	int n; scanf("%d", &n);
	a.resize(n); b.resize(n);
	cnta.resize(n); cntb.resize(n);
	for(int i=0; i<n; i++){
		scanf("%d%d%d%d", &a[i].first.first, &a[i].first.second, &b[i].first.first, &b[i].first.second);
		a[i].second=i; b[i].second=i;
	}
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	for(int i=0; i<n; i++){
		int lf=a[i].first.first;
		int rg=a[i].first.second;
		int idx=a[i].second;
		int ub=upper_bound(a.begin(), a.end(), mp(mp(rg, INT_MAX), INT_MAX))-a.begin();
		cnta[idx]=n-ub;
	}
	for(int i=0; i<n; i++){
		int lf=b[i].first.first;
		int rg=b[i].first.second;
		int idx=b[i].second;
		int ub=upper_bound(b.begin(), b.end(), mp(mp(rg, INT_MAX), INT_MAX))-b.begin();
		cntb[idx]=n-ub;
	}
	for(int i=0; i<n; i++){
	//	cout<<cnta[i]<<" "<<cntb[i]<<endl;
		if(cnta[i]!=cntb[i]) reject();
	}
	accept();
}


#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<pair<pair<int, int>, int> >a, b;
vector<int>cnta, cntb;
void reject(){printf("NO\n"); exit(0);}
void accept(){printf("YES\n"); exit(0);}
int main(){
	int n; scanf("%d", &n);
	a.resize(n); b.resize(n);
	cnta.resize(n); cntb.resize(n);
	for(int i=0; i<n; i++){
		scanf("%d%d%d%d", &a[i].first.first, &a[i].first.second, &b[i].first.first, &b[i].first.second);
		a[i].second=i; b[i].second=i;
	}
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	for(int i=0; i<n; i++){
		if(a[i].second!=b[i].second) reject();
	}
	for(int i=0; i<n; i++){
		int lf=a[i].first.first;
		int rg=a[i].first.second;
		int idx=a[i].second;
		int ub=upper_bound(a.begin(), a.end(), mp(mp(rg, INT_MAX), INT_MAX))-a.begin();
		cnta[idx]=n-ub;
	}
	for(int i=0; i<n; i++){
		int lf=b[i].first.first;
		int rg=b[i].first.second;
		int idx=b[i].second;
		int ub=upper_bound(b.begin(), b.end(), mp(mp(rg, INT_MAX), INT_MAX))-b.begin();
		cntb[idx]=n-ub;
	}
	for(int i=0; i<n; i++){
	//	cout<<cnta[i]<<" "<<cntb[i]<<endl;
		if(cnta[i]!=cntb[i]) reject();
	}
	accept();
}


#include<bits/stdc++.h>
using namespace std;
int sa[100005], sb[100005], ea[100005], eb[100005];
int n;
bool solve(){
	vector<pair<pair<int, int>, int> >a;
	for(int i=1; i<=n; i++){
		a.push_back({{sa[i], -1},  i});
		a.push_back({{ea[i], 1}, i});
	}
	sort(a.begin(), a.end());
	multiset<int>s, e;
	for(auto p:a){
		int fg=p.first.second;
		int id=p.second;
		if(fg==-1){
			s.insert(sb[id]);
			e.insert(eb[id]);
			if(s.size() && *(s.rbegin())>*(e.begin()))
				return false;
		}else{
			s.erase(s.find(sb[id]));
			e.erase(e.find(eb[id]));
		}
	}
	return true;
}
int main(){
	scanf("%d", &n);
	for(int i=1; i<=n; i++){
		scanf("%d%d%d%d", sa+i, ea+i, sb+i, eb+i);
	}
	if(!solve()){
		printf("NO\n");
		return 0;
	}
	swap(sa, sb); swap(ea, eb);
	if(!solve()){
		printf("NO\n");
		return 0;
	}
	printf("YES\n");
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<pair<pair<int, int>, int> >a, b;
vector<int>cnta, cntb;
void reject(){printf("NO\n"); exit(0);}
void accept(){printf("YES\n"); exit(0);}
int main(){
	int n; scanf("%d", &n);
	a.resize(n); b.resize(n);
	cnta.resize(n); cntb.resize(n);
	for(int i=0; i<n; i++){
		scanf("%d%d%d%d", &a[i].first.first, &a[i].first.second, &b[i].first.first, &b[i].first.second);
		a[i].second=i; b[i].second=i;
	}
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
//	for(int i=0; i<n; i++){
//		if(a[i].second!=b[i].second) reject();
//	}
	for(int i=0; i<n; i++){
		int lf=a[i].first.first;
		int rg=a[i].first.second;
		int idx=a[i].second;
		int ub=upper_bound(a.begin(), a.end(), mp(mp(rg, INT_MAX), INT_MAX))-a.begin();
		cnta[idx]=n-ub;
	}
	for(int i=0; i<n; i++){
		int lf=b[i].first.first;
		int rg=b[i].first.second;
		int idx=b[i].second;
		int ub=upper_bound(b.begin(), b.end(), mp(mp(rg, INT_MAX), INT_MAX))-b.begin();
		cntb[idx]=n-ub;
	}
	for(int i=0; i<n; i++){
	//	cout<<cnta[i]<<" "<<cntb[i]<<endl;
		if(cnta[i]!=cntb[i]) reject();
	}
	accept();
}


#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<pair<pair<int, int>, pair<int, int> > >a, b;
map<int, vector<int> >posA, posB;
vector<pair<int, int> >rangeA, rangeB;
void reject(){printf("NO\n"); exit(0);}
void accept(){printf("YES\n"); exit(0);}
bool sect(pair<int, int>x, pair<int, int>y){
//	cout<<x.first<<" "<<x.second<<" "<<y.first<<" "<<y.second<<endl;
	if(x.second<y.first) return false;
	if(x.first>y.second) return false;
	return true;
}
int main(){
	int n; scanf("%d", &n);
	a.resize(n); b.assign(n, mp(mp(-1, -1), mp(-1, -1)));
	for(int i=0; i<n; i++)
		scanf("%d%d%d%d", &a[i].first.first, &a[i].first.second, &a[i].second.first, &a[i].second.second);
	for(int i=0; i<n; i++){
		posA[a[i].first.first].push_back(i);
		posA[a[i].first.second].push_back(i);
	}
	for(int i=0; i<n; i++){
		posB[a[i].second.first].push_back(i);
		posB[a[i].second.second].push_back(i);
	}
	int cnt=0;
	for(auto i:posA){
		vector<int>isi=i.second;
		int mn=cnt+1;
		for(int j:isi){
			cnt++;
			if(b[j].first.first==-1) b[j].first.first=cnt;
			else b[j].first.second=cnt;
		}
		int mx=cnt;
		rangeA.push_back({mx, mn});
	}
	cnt=0;
	for(auto i:posB){
		vector<int>isi=i.second;
		int mn=cnt+1;
		for(int j:isi){
			cnt++;
			if(b[j].second.first==-1) b[j].second.first=cnt;
			else b[j].second.second=cnt;
		}
		int mx=cnt;
		rangeB.push_back({mx, mn});
	}
	for(int i=0; i<n; i++){
		int Ll=b[i].first.first;
		int Lr=b[i].first.second;
		int Rl=b[i].second.first;
		int Rr=b[i].second.second;
		int ill=lower_bound(rangeA.begin(), rangeA.end(), mp(Ll, Ll))-rangeA.begin();
		int ilr=lower_bound(rangeA.begin(), rangeA.end(), mp(Lr, Lr))-rangeA.begin();
		int irl=lower_bound(rangeB.begin(), rangeB.end(), mp(Rl, Rl))-rangeA.begin();
		int irr=lower_bound(rangeB.begin(), rangeB.end(), mp(Rr, Rr))-rangeA.begin();
		pair<int, int>ll=rangeA[ill];
		pair<int, int>lr=rangeA[ilr];
		pair<int, int>rl=rangeA[irl];
		pair<int, int>rr=rangeA[irr];
		bool ok1=sect(ll, rl), ok2=sect(lr, rr);
		if(!ok1 || !ok2) reject();
	}
	accept();
}


///By Stephan Ramirez dsramirezc@unal.edu.co
#include<bits/stdc++.h>
#define ms(a,v) memset(a,v,sizeof a)
#define ll long long
#define N 100100
#define ff first
#define se second
using namespace std;

int n;
int arr[N][4];
vector<pair<pair<int,int>, pair<int,int> >> v;
vector<pair<pair<int,int>, pair<int,int> >> v1;

bool sol(vector<pair<pair<int,int>, pair<int,int> >> s){
    int i=0;
    int j=0;

    priority_queue<pair<int,int> > l;
    priority_queue<pair<int,int> > r;
    priority_queue<pair<int,int> > l1;
    priority_queue<pair<int,int> > r1;
    l.push({s[i].ff.ff,i});
    l1.push({s[i].se.ff,i});
    r.push({-s[i].ff.se,i});
    r1.push({-s[i].se.se,i});
    while(i<n && j<n){
        while(j<n && -r.top().first>=l.top().first){
            if(-r1.top().first<l1.top().first)
                return false;
            j++;
            l.push({s[j].ff.ff,j});
            l1.push({s[j].se.ff,j});
            r.push({-s[j].ff.se,j});
            r1.push({-s[j].se.se,j});
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();

        }
        if(j ==n && -r.top().first>=l.top().first &&  -r1.top().first<l1.top().first)
            return false;
        i++;
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();
    }
    return true;
}

int main(){
	#ifdef LOCAL
		freopen("in.txt","r",stdin);
		//freopen("out.txt","w",stdout);
	#endif
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d %d %d %d",&arr[i][0],&arr[i][1],&arr[i][2],&arr[i][3]);
        //printf("%d %d %d %d\n",arr[i][0],arr[i][1],arr[i][2],arr[i][3]);
        v.push_back({{arr[i][0],arr[i][1]},{arr[i][2],arr[i][3]}});
        v1.push_back({{arr[i][2],arr[i][3]},{arr[i][0],arr[i][1]}});
    }
    sort(v.begin(),v.end());
    sort(v1.begin(),v1.end());
    if(sol(v) && sol(v1)){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

	return 0;
}


///By Stephan Ramirez dsramirezc@unal.edu.co
#include<bits/stdc++.h>
#define ms(a,v) memset(a,v,sizeof a)
#define ll long long
#define N 100100
#define ff first
#define se second
using namespace std;

int n;
int arr[N][4];
vector<pair<pair<int,int>, pair<int,int> >> v;
vector<pair<pair<int,int>, pair<int,int> >> v1;

bool sol(vector<pair<pair<int,int>, pair<int,int> >> s){
    int i=0;
    int j=0;

    priority_queue<pair<int,int> > l;
    priority_queue<pair<int,int> > r;
    priority_queue<pair<int,int> > l1;
    priority_queue<pair<int,int> > r1;
    l.push({s[i].ff.ff,i});
    l1.push({s[i].se.ff,i});
    r.push({-s[i].ff.se,i});
    r1.push({-s[i].se.se,i});
    while(i<n && j<n){
        while(j<n && -r.top().first>=l.top().first){
            if(-r1.top().first<l1.top().first)
                return false;
            j++;
            l.push({s[j].ff.ff,j});
            l1.push({s[j].se.ff,j});
            r.push({-s[j].ff.se,j});
            r1.push({-s[j].se.se,});
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();

        }
        if(j ==n && -r1.top().first<l1.top().first)
                return false;
        i++;
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();
    }
    return true;
}

int main(){
	#ifdef LOCAL
		freopen("in.txt","r",stdin);
		//freopen("out.txt","w",stdout);
	#endif
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d %d %d %d",&arr[i][0],&arr[i][1],&arr[i][2],&arr[i][3]);
        //printf("%d %d %d %d\n",arr[i][0],arr[i][1],arr[i][2],arr[i][3]);
        v.push_back({{arr[i][0],arr[i][1]},{arr[i][2],arr[i][3]}});
        v1.push_back({{arr[i][2],arr[i][3]},{arr[i][0],arr[i][1]}});
    }
    sort(v.begin(),v.end());
    sort(v1.begin(),v1.end());
    if(sol(v) && sol(v1)){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

	return 0;
}


///By Stephan Ramirez dsramirezc@unal.edu.co
#include<bits/stdc++.h>
#define ms(a,v) memset(a,v,sizeof a)
#define ll long long
#define N 100100
#define ff first
#define se second
using namespace std;

int n;
int arr[N][4];
vector<pair<pair<int,int>, pair<int,int> >> v;
vector<pair<pair<int,int>, pair<int,int> >> v1;

bool sol(vector<pair<pair<int,int>, pair<int,int> >> s){
    int i=0;
    int j=0;

    priority_queue<pair<int,int> > l;
    priority_queue<pair<int,int> > r;
    priority_queue<pair<int,int> > l1;
    priority_queue<pair<int,int> > r1;
    l.push({s[i].ff.ff,i});
    l1.push({s[i].se.ff,i});
    r.push({-s[i].ff.se,i});
    r1.push({-s[i].se.se,i});
    while(i<n && j<n){
        while(j<n && -r.top().first>=l.top().first){
            if(-r1.top().first<l1.top().first)
                return false;
            j++;
            l.push({s[j].ff.ff,j});
            l1.push({s[j].se.ff,j});
            r.push({-s[j].ff.se,j});
            r1.push({-s[j].se.se,j});
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();

        }
        i++;
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();
    }
    return true;
}

int main(){
	#ifdef LOCAL
		freopen("in.txt","r",stdin);
		//freopen("out.txt","w",stdout);
	#endif
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d %d %d %d",&arr[i][0],&arr[i][1],&arr[i][2],&arr[i][3]);
        //printf("%d %d %d %d\n",arr[i][0],arr[i][1],arr[i][2],arr[i][3]);
        v.push_back({{arr[i][0],arr[i][1]},{arr[i][2],arr[i][3]}});
        v1.push_back({{arr[i][2],arr[i][3]},{arr[i][0],arr[i][1]}});
    }
    sort(v.begin(),v.end());
    sort(v1.begin(),v1.end());
    if(sol(v) && sol(v1)){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

	return 0;
}


///By Stephan Ramirez dsramirezc@unal.edu.co
#include<bits/stdc++.h>
#define ms(a,v) memset(a,v,sizeof a)
#define ll long long
#define N 200100
#define ff first
#define se second
using namespace std;

int n;
int arr[N][4];
vector<pair<pair<int,int>, pair<int,int> >> v;
vector<pair<pair<int,int>, pair<int,int> >> v1;

bool sol(vector<pair<pair<int,int>, pair<int,int> >> s){
    int i=0;
    int j=0;

    priority_queue<pair<int,int> > l;
    priority_queue<pair<int,int> > r;
    priority_queue<pair<int,int> > l1;
    priority_queue<pair<int,int> > r1;
    l.push({s[i].ff.ff,i});
    l1.push({s[i].se.ff,i});
    r.push({-s[i].ff.se,i});
    r1.push({-s[i].se.se,i});
    while(i<n && j<n){
        while(j<n && -r.top().first>=l.top().first){
            if(-r1.top().first<l1.top().first)
                return false;
            j++;
            if(j==n)
                return true;
            l.push({s[j].ff.ff,j});
            l1.push({s[j].se.ff,j});
            r.push({-s[j].ff.se,j});
            r1.push({-s[j].se.se,j});
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();

        }

            i++;
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();
    }
    return true;
}

int main(){
	#ifdef LOCAL
		freopen("in.txt","r",stdin);
		//freopen("out.txt","w",stdout);
	#endif
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d %d %d %d",&arr[i][0],&arr[i][1],&arr[i][2],&arr[i][3]);
        v.push_back({{arr[i][0],arr[i][1]},{arr[i][2],arr[i][3]}});
        v1.push_back({{arr[i][2],arr[i][3]},{arr[i][0],arr[i][1]}});
    }
    sort(v.begin(),v.end());
    sort(v1.begin(),v1.end());
    if(sol(v) && sol(v1)){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

	return 0;
}


///By Stephan Ramirez dsramirezc@unal.edu.co
#include<bits/stdc++.h>
#define ms(a,v) memset(a,v,sizeof a)
#define ll long long
#define N 100100
#define ff first
#define se second
using namespace std;

int n;
int arr[N][4];
vector<pair<pair<int,int>, pair<int,int> >> v;
vector<pair<pair<int,int>, pair<int,int> >> v1;

bool sol(vector<pair<pair<int,int>, pair<int,int> >> s){
    int i=0;
    int j=0;

    priority_queue<pair<int,int> > l;
    priority_queue<pair<int,int> > r;
    priority_queue<pair<int,int> > l1;
    priority_queue<pair<int,int> > r1;
    l.push({s[i].ff.ff,i});
    l1.push({s[i].se.ff,i});
    r.push({-s[i].ff.se,i});
    r1.push({-s[i].se.se,i});
    while(i<n && j<n){
        while(j<n && -r.top().first>=l.top().first){
            if(-r1.top().first<l1.top().first)
                return false;
            j++;
            l.push({s[j].ff.ff,j});
            l1.push({s[j].se.ff,j});
            r.push({-s[j].ff.se,j});
            r1.push({-s[j].se.se,j});
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();

        }
        if(j ==n && -r1.top().first<l1.top().first)
            return false;
        i++;
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();
    }
    return true;
}

int main(){
	#ifdef LOCAL
		freopen("in.txt","r",stdin);
		//freopen("out.txt","w",stdout);
	#endif
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d %d %d %d",&arr[i][0],&arr[i][1],&arr[i][2],&arr[i][3]);
        //printf("%d %d %d %d\n",arr[i][0],arr[i][1],arr[i][2],arr[i][3]);
        v.push_back({{arr[i][0],arr[i][1]},{arr[i][2],arr[i][3]}});
        v1.push_back({{arr[i][2],arr[i][3]},{arr[i][0],arr[i][1]}});
    }
    sort(v.begin(),v.end());
    sort(v1.begin(),v1.end());
    if(sol(v) && sol(v1)){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

	return 0;
}


///By Stephan Ramirez dsramirezc@unal.edu.co
#include<bits/stdc++.h>
#define ms(a,v) memset(a,v,sizeof a)
#define ll long long
#define N 200100
#define ff first
#define se second
using namespace std;

int n;
int arr[N][4];
vector<pair<pair<int,int>, pair<int,int> >> v;
vector<pair<pair<int,int>, pair<int,int> >> v1;

bool sol(vector<pair<pair<int,int>, pair<int,int> >> s){
    int i=0;
    int j=0;

    priority_queue<pair<int,int> > l;
    priority_queue<pair<int,int> > r;
    priority_queue<pair<int,int> > l1;
    priority_queue<pair<int,int> > r1;
    l.push({s[i].ff.ff,i});
    l1.push({s[i].se.ff,i});
    r.push({-s[i].ff.se,i});
    r1.push({-s[i].se.se,i});
    while(i<n && j<n){
        while(j<n && -r.top().first>=l.top().first){
            if(-r1.top().first<l1.top().first)
                return false;
            j++;
            if(j==n)
                return true;
            l.push({s[j].ff.ff,j});
            l1.push({s[j].se.ff,j});
            r.push({-s[j].ff.se,j});
            r1.push({-s[j].se.se,j});
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();

        }
            if(-r1.top().first>=l1.top().first)
                return false;
            i++;
            while(l.size()>0 && l.top().second<i)
                l.pop();
            while(r.size()>0 &&  r.top().second<i)
                r.pop();
            while(l1.size()>0 &&  l1.top().second<i)
                l1.pop();
            while(r1.size()>0 &&  r1.top().second<i)
                r1.pop();
    }
    return true;
}

int main(){
	#ifdef LOCAL
		freopen("in.txt","r",stdin);
		//freopen("out.txt","w",stdout);
	#endif
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d %d %d %d",&arr[i][0],&arr[i][1],&arr[i][2],&arr[i][3]);
        v.push_back({{arr[i][0],arr[i][1]},{arr[i][2],arr[i][3]}});
        v1.push_back({{arr[i][2],arr[i][3]},{arr[i][0],arr[i][1]}});
    }
    sort(v.begin(),v.end());
    sort(v1.begin(),v1.end());
    if(sol(v) && sol(v1)){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

	return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
sum=abs(a-s);
//cout<<sum;
if(sum==0 && n<0 && m>0)
cout<<"1";
else if(sum>0 && n< k*(-1) &&m<-k*(-1) || sum>0 && n>k && m>k)
  {cout<<sum;}
else
    cout<<sum+1;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
sum=abs(a-s);
if(sum==0 && n<0 && m>0)
cout<<"1";
//else if(sum>0 && n<=0 &&m<=0 || sum>0 && n>=0 && m>=0)
   // cout<<sum+1;
else
    cout<<sum+1;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0,p;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
p=k*(-1);
sum=abs(a-s);
//cout<<sum;
if(sum==0 && n<0 && m>0)
cout<<"1";
else if(sum>0 && n<p &&m<p &&k==1|| sum>0 && n>k && m>k &&k==1)
  cout<<sum+1;
else if(sum>0 && n<p &&m<p || sum>0 && n>k && m>k)
  cout<<sum;
else
    cout<<sum+1;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0,p;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
p=k*(-1);
sum=abs(a-s);
//cout<<sum;
if(sum==0 && n<0 && m>0)
cout<<"1";
else if(sum>0 && n<p &&m<p || sum>0 && n>k && m>k)
  cout<<sum;
else
    cout<<sum+1;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
sum=abs(a-s)+1;
cout<<sum;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ull prime(ull n) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,a,b;
cin>>k>>a>>b;
if (a>0 && a%k!=0)
{
	cout<<abs((a/k)-(b/k));
}
else if (b<0 && b%k!=0)
{
	cout<<abs((a/k)-(b/k));
}
else
cout<<abs((a/k)-(b/k))+1;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0,p;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
p=k*(-1);
sum=abs(a-s);
//cout<<sum;
if(sum==0 && n<0 && m>0 || sum==0 && n==m && n<=p ||  sum==0 && n==m && n>=k)
cout<<"1";
else if(sum>0 && n<0 &&m<0 &&k==1|| sum>0 && n>0 && m>0 &&k==1)
  cout<<sum+1;
else if(sum==0 && n>p &&m>p|| sum==0 && n<k && m<k)
      cout<<sum;
      else if(sum>0 && n<=p && m<=p || sum>0 && n>=k && m>=k)
        cout<<sum+1;
        else
            cout<<sum;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0,p;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
p=k*(-1);
sum=abs(a-s);
//cout<<sum;
if(sum==0 && n<0 && m>0)
cout<<"1";
else if(sum>0 && n<0 &&m<0 &&k==1|| sum>0 && n>0 && m>0 &&k==1)
  cout<<sum+1;
else if(sum>0 && n<0 &&m<0|| sum>0 && n>0 && m>0)
  cout<<sum;
else
    cout<<sum+1;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0,p;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
p=k*(-1);
sum=abs(a-s);
//cout<<sum;
if(sum==0 && n<=0 && m>=0|| sum==0 && n==m && n<=p ||  sum==0 && n==m && n>=k)
cout<<"1";
else if(sum>0 && n<0 &&m<0 &&k==1|| sum>0 && n>0 && m>0 &&k==1)
  cout<<sum+1;
else if(sum==0 && n>p &&m>p|| sum==0 && n<k && m<k)
      cout<<sum;
      else if(sum>0 && n<=p && m<=p || sum>0 && n>=k && m>=k)
        cout<<sum+1;
        else if(sum>0 &&n<=p && m>=k)
            cout<<sum+1;
        else
            cout<<sum;
 return 0;
}


//headerfile//////////////
#include <bits/stdc++.h>
//define///////////////////
#define S(x) scanf("%d",&x)
#define P(x) printf("%d\n",x)
#define szo(x) ((int)sizeof(x))
#define szs(x) ((int)(x).size())
#define S2(x,y) scanf("%d%d",&x,&y)
#define loop(i,a,b) for(int i = a; i < b; i++)
#define revloop(i,a,n) for (int i=n-1;i>=a;i--)
//////typedef//////////
typedef long long int ll;
typedef unsigned long long int ull;
const ll mod=1000000007;
const int INF = 1000000000;
using namespace std;
//////functions////////
ull pow2(ull s) {if(s!=0 && (s & (s-1)))cout<<"0";else cout<<"1";}
ull powany(ll a,ll b) {ull res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ull pow2(ull s) {if(n==2||n==3)return 1;if(n%2==0||n%3==0)return 0;for(ull i=7;i*i<n;i+=6)if(n%(i)==0||n%(i-2)==0)return 0;return 1;}
//head//////////////////
int main() {
ll k,sum=0;
ll n,m,a=0,s=0;
cin>>k>>n>>m;
a=n/k;
s=m/k;
sum=abs(a-s);
//cout<<sum;
if(sum==0 && n<0 && m>0)
cout<<"1";
else if(sum>0 && n<0 &&m<0 || sum>0 && n>0 && m>0)
  {cout<<sum;}
else
    cout<<sum+1;
 return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll a, b, k;
	cin>>k>>a>>b;
	if( a<0 ){
		int by = -a/k;
		a += (by+1) * k;
		b += (by+1) * k;
	}

	a = (a-1)/k;
	b = b/k;
	cout << b-a <<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll aa, a, b, k;
	cin>>k>>a>>b;
/*	if( a<=0 ){
		int by = -a/k;
		a += (by) * k;
		b += (by) * k;
	}//*/
	aa = (a-1)/k;
	if(a <= 0)
		aa--;
	b = b/k;
	if( aa < 0 ){
		b -= aa; aa = 0;
	}
	cout << b-aa <<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll aa, a, b, k;
	cin>>k>>a>>b;
/*	if( a<=0 ){
		int by = -a/k;
		a += (by) * k;
		b += (by) * k;
	}//*/
	if(k == 1) {
		cout<< b-a+1 << endl;
		return 0;
	}
	aa = (a)/k;
	if(a <= 0)
		aa--;
	b = b/k;
	if( aa < 0 ){
		b -= aa; aa = 0;
	}
	cout << b-aa <<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll a, b, k;
	cin>>k>>a>>b;
	if( a<=0 ){
		int by = -a/k;
		a += (by+1) * k;
		b += (by+1) * k;
	}

	a = (a-1)/k;
	b = b/k;
	cout << b-a <<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll aa, a, b, k;
	cin>>k>>a>>b;
/*	if( a<=0 ){
		int by = -a/k;
		a += (by) * k;
		b += (by) * k;
	}//*/
	if(k == 1) {
		cout<< b-a+1 << endl;
		return 0;
	}
	aa = (a)/k;
	if(a <= 0 || (a%k) == 0)
		aa--;
	b = b/k;
	if( aa < 0 ){
		b -= aa; aa = 0;
	}
	cout << b-aa <<endl;
}


#include <cstdio>
int main(){
	int a, b, k;
	scanf("%d%d%d",&k,&a,&b);
	if( a<0 ){
		int by = -a/k;
		a += (by+1) * k;
		b += (by+1) * k;
	}

	a = (a-1)/k;
	b = b/k;
	printf("%d\n", b-a);
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll aa, a, b, k;
	cin>>k>>a>>b;
	if( a<=0 && b <=0){
		a = -a;
		b = -b;
		swap(a,b);
	}
	if(k == 1) {
		cout<< b-a+1 << endl;
		return 0;
	}
	//cout << a << ' ' << b << endl;
	aa = (a)/k;
	if(a <= 0 || (a%k) == 0)
		aa--;
	b = b/k;
	if( aa < 0 ){
		b -= aa; aa = 0;
	}
	cout << b-aa <<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll aa, a, b, k;
	cin>>k>>a>>b;
/*	if( a<=0 ){
		int by = -a/k;
		a += (by) * k;
		b += (by) * k;
	}//*/
	if(k == 1) {
		cout<< b-a+1 << endl;
		return 0;
	}
	aa = (a-1)/k;
	if(a <= 0)
		aa--;
	b = b/k;
	if( aa < 0 ){
		b -= aa; aa = 0;
	}
	cout << b-aa <<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll a, b, k;
	cin>>k>>a>>b;
	if( a<=0 ){
		ll by = -a/k;
		a += (by+1) * k;
		b += (by+1) * k;
	}
	a = (a-1)/k;
	b = b/k;
	cout << b-a <<endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll aa, a, b, k;
	cin>>k>>a>>b;
	if( a<=0 && b <=0){
		int by = -a/k;
		a += (by) * k;
		b += (by) * k;
	}
	if(k == 1) {
		cout<< b-a+1 << endl;
		return 0;
	}
	aa = (a)/k;
	if(a <= 0 || (a%k) == 0)
		aa--;
	b = b/k;
	if( aa < 0 ){
		b -= aa; aa = 0;
	}
	cout << b-aa <<endl;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	//system("mode 150,150");
	u k, a, b, c;
	cin >> k >> a >> b;
	a = (a / k)*k; b = (b / k)*k;
	//cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	// آلهى تنشكى ف معاميعك
	//system("mode 150,150");
	u k, a, b, c,aa,bb;
	cin >> k >> a >> b;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if(a < aa)a++;
	if (b>bb)b--;
	//cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;

int main(){
	// اتقى ربنا فيا :"D
	//system("mode 150,150");
	u k, a, b, aa, bb; uu c;
	cin >> k >> a >> b;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if(a < aa)a++;
	if (b>bb)b--;
	//cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
//	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b,c;
	cin >> k >> a >> b;
	c = u(1 + u(b) - u(a));
	cout <<  (  ((a % k == 0||b%k==0)&&k!=1) ? ((c/k)+1) : c / k ) << endl;
	return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	double k, a, b;
	cin >> k >> a >> b;
	u c = u(1 + u(b) - u(a));
	cout << (((u(a) % u(k) == 0) || (u(b) % u(k) == 0)) ? uu(c / k) + 1: uu(c / k)) << endl;
	//cout << ((u(a) % u(k) == 0) || (u(b) % u(k) == 0)) << endl;
	//cout << uu(c / k) <<" "<< uu(c / k) + 1<< endl;	return 0;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	// آلهى تنشكى ف معاميعك
	//system("mode 150,150");
	u k, a, b, c;
	cin >> k >> a >> b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	//cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	double k, a, b;
	cin >> k >> a >> b;
	if (k == 0||k == 1){ cout << b - a + 1 << endl; return 0; }
	cout << ((  (u(a) % u(k) == 0)  || (u(b) % u(k) == 0)) ? (ceil((b - a + 1) / k)) : (u((b - a + 1) / k))) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
    // :""""""""""""D
u k, a, b, c;
cin >> k >> a >> b;
c = (0 >= a && 0 <= b) ? 1 : 0;
if (a < 0 && b<0){ swap(a, b); a = -a; b = -b; }
c += (b / k);
if (a > 1){
c -= ((a-1) / k);
}
if (a < 0){
c += ((-a) / k);
}
cout <<c << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b, aa, bb; uu c;
	cin >> k >> a >> b;
	c = (0 >= a && 0 <= b) ? 1 : 0;
	aa = a; bb = b;
	if (a == -b){
		c += (b/k)*2 ;
		cout << (c) << endl; return 0;
	}
	if (a < 0 && b<0){ swap(a, b); a = -a; b = -b; }
	c += (b / k);
	if (a > 1){
		c -= ((a-1) / k);
	}
	if (a < 0){
		c += ((-a) / k);
	}
	cout <<c << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;
		if(abs(k)<abs(a)||(0>a&&0<=b))for (a; a%k != 0; a++);
		if (abs(k)<abs(b)||(0>=a&&0<b))for (b; b%k != 0; b--);
	//	cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		//cout << c / k << endl;
		cout << ((c%k == 0&&c>=k)? c / k : (c / k) + 1) << endl;
		return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b, aa, bb; uu c;
	cin >> k >> a >> b;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if (a < aa)a++;
	if (b>bb)b--;
	//cout << a << " " << b <<endl;
	if (a == b){
		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	c = (abs(a) / k) + (abs(b) / k);
	if(0 >= a && 0 <= b)c++;
	cout <<c << endl;
	//cout << ((c % k == 0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k) + 1)) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;

	if (abs(a) != abs(b)){
		for (a; (a%k != 0 && a<b); a++);
		for (b; (b%k != 0 && b>a); b--);
	}
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
using namespace std;
int main(){
	//signed long long k, a, b, i = 0, c = 0;
//	while (true){
		signed long long k, a, b, i , c = 0,m;
		cin >> k >> a >> b;
		if (k == 0 || k == 1){
			cout << b - a + 1 << endl; return 0;
			//continue;
		}
		if (a <= 0)i = 0;
		else{
			for (m = a; m%k != 0; m++); i = m/k;
		}
		if (i==0)
		while (true){
				if (k*i <= b&&k*i >= a){ c++; }
				if (-k*i <= b&& -k*i >= a &&-k*i!=k*i){ c++; }
			i++;
			if ((k*i > b||k*i < a) && (-k*i > b || -k*i < a))break;
		}
		else
		while (true){
			if (k*i <= b&&k*i >= a){ c++; }
			//cout << k*i << " ";
			i++;
			if (k*i > b)break;
		}
		cout << c << endl;
	//}
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;
		if(abs(k)<abs(a))for (a; a%k != 0; a++);
		if (abs(k)<abs(b))for (b; b%k != 0; b--);
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		//cout << c / k << endl;
		cout << ((c%k == 0||abs(k)>abs(a)&&abs(k)>abs(b)) ? c / k : (c / k) + 1) << endl;
		return 0;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	// آلهى تنشكى ف معاميعك
	//system("mode 150,150");
	u k, a, b, c;
	cin >> k >> a >> b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
void main(void){
	u k, a, b,c;
	cin >> k >> a >> b;
	c = u(1 + u(b) - u(a));
	cout <<  (  (c % k != 0) ? ((c/k)+1) : c / k ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
int main(){
	double k, a, b;
	cin >> k >> a >> b;
	cout << ceil((b - a+1) / k) << endl;
	return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	double k, a, b;
	cin >> k >> a >> b;
	if (k == 0||k == 1){ cout << uu(b) -uu( a) + 1 << endl; return 0; }
	cout << ((  (u(a) % u(k) == 0)  || (u(b) % u(k) == 0)) ? uu(ceil((b - a + 1) / k)) : uu(u((b - a + 1) / k))) << endl;
	//return 0;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	// ربنا ياخدك
	//system("mode 150,150");
	u k, a, b, c;
	cin >> k >> a >> b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(a) / double(k))*k;
//	cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;
	if (-a == b){ cout << (b - a + 1) / k << endl; return 0; }

		for (a; (a%k != 0 && a<b); a++);
		for (b; (b%k != 0 && b>a); b--);

	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;

	if (abs(a) != abs(b)){
		for (a; (a%k != 0 && a<b); a++);
		for (b; (b%k != 0 && b>a); b--);
	}
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		cout << ((c >= k) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long u;
int main(){
	double k, a, b;
	cin >> k >> a >> b;
	cout << ((u(a) % u(k) == 0 || (u(b) % u(k) == 0)) ? (ceil((b - a + 1) / k)) : (u((b - a + 1) / k))) << endl;
	return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;

		for (a; (a%k != 0 && a<b); a++);
		for (b; (b%k != 0 && b>a); b--);

	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b, aa, bb; uu c;
	cin >> k >> a >> b;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if (a < aa)a++;
	if (b>bb)b--;
	if (a == b){
		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	(a<0) ? c = (abs(b) / k) + (abs(a) / k) : (a == 1) ? c = (abs(b) / k) : c = (abs(b) / k) - (abs(a) / k)+1;
	if(0 >= a && 0 <= b)c++;
	cout <<c << endl;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	//system("mode 150,150");
	u k, a, b, c;
	cin >> k >> a >> b;
	a = (a / k)*k; b = (b / k)*k;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a || k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
//	while (true){
		u k, a, b, c;
		cin >> k >> a >> b;
		c = 1 + b - a;
		if (k == 1 || k == 0){ cout << c << endl;
	return 0;
		//continue;

		}
	//	cout << c << " " << k << " " << c / k << " " << (c / k) + 1 << endl;
		//cout <<  (  ((a % k == 0&&b%k==0)&&k!=1) ? ((c/k)+1) : c / k ) << endl;
		cout << ((c%k != 0&&(a%k==0||b%k==0)) ? (c / k) + 1 : c / k) << endl;
		//return 0;
//	}
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b,c;
	cin >> k >> a >> b;
	c = u(1 + u(b) - u(a));
	cout <<  (  ((a % k == 0&&b%k==0)&&k!=1) ? ((c/k)+1) : c / k ) << endl;
	return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b, aa, bb; uu c;
	cin >> k >> a >> b;
	c = (0 >= a && 0 <= b) ? 1 : 0;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if (a < aa)a++;
	if (b>bb)b--;
	if (a == -b){
		c += (b / k) * 2;
		cout << c << endl; return 0;
	}
	if (a < 0 && b<0){ swap(a, b); a = -a; b = -b; }
	c += (b / k);
	if (a > 1){
		c -= ((a-1) / k);
	}
	if (a < 0){
		c += ((-a) / k);
	}
	cout <<c << endl;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;

int main(){
	// اتقى ربنا فيا :"D
	//system("mode 150,150");
	u k, a, b, aa, bb; uu c;
	cin >> k >> a >> b;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if(a < aa)a++;
	if (b>bb)b--;
	//cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	//system("mode 150,150");
	u k, a, b, c;
	cin >> k >> a >> b;
	if (k<a || k>b){ cout << 0 << endl; return 0; }
	a = (a / k)*k; b = (b / k)*k;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;
		if(abs(k)<abs(a))for (a; a%k != 0; a++);
		if (abs(k)<abs(b))for (b; b%k != 0; b--);
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		//cout << c / k << endl;
		cout << ((c%k == 0&&c>k)/*||(abs(k)>abs(a)&&abs(k)>abs(b)*/ ? c / k : (c / k) + 1) << endl;
		return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
void main(){
	u k, a, b,c;
	cin >> k >> a >> b;
	c = u(1 + u(b) - u(a));
	cout <<  (  (c % k != 0) ? ((c/k)+1) : c / k ) << endl;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	// اتقى ربنا فيا :"D
	//system("mode 150,150");
	u k, a, b, c,aa,bb;
	cin >> k >> a >> b;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if(a < aa)a++;
	if (b>bb)b--;
	//cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b, aa, bb; uu c;
	cin >> k >> a >> b;
	c = (0 >= a && 0 <= b) ? 1 : 0;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if (a < aa)a++;
	if (b>bb)b--;
	if (a < 0 && b<0){ swap(a, b); a = -a; b = -b; }
	c += (b / k);
	if (a > 1){
		c -= ((a-1) / k);
	}
	if (a < 0){
		c += ((-a) / k);
	}
	cout <<c << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	double k, a, b;
	cin >> k >> a >> b;
	cout << ((  (u(a) % u(k) == 0)  || (u(b) % u(k) == 0)) ? (ceil((b - a + 1) / k)) : (u((b - a + 1) / k))) << endl;
	//cout << (u(a) % u(k) == 0) <<" "<< (u(b) % u(k) == 0);
	//cout << ceil((b - a + 1) / k);
	return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
int main(){
	double k, a, b;
	cin >> k >> a >> b;
	cout << ((b - a+1) / k) << endl;
	return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;
		if(abs(k)<abs(a)||0>a)for (a; a%k != 0; a++);
		if (abs(k)<abs(b)||0<b)for (b; b%k != 0; b--);
	//	cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		//cout << c / k << endl;
		cout << ((c%k == 0&&c>=k)? c / k : (c / k) + 1) << endl;
		return 0;
}


#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;
		if(abs(k)<abs(a))for (a; a%k != 0; a++);
		if (abs(k)<abs(b))for (b; b%k != 0; b--);
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		//cout << c << endl;
		//cout << c / k << endl;
		cout << ((c%k == 0&&c>=k)/*||(abs(k)>abs(a)&&abs(k)>abs(b)*/ ? c / k : (c / k) + 1) << endl;
		return 0;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
int main(){
	u k, a, b,c;
	cin >> k >> a >> b;
	c = u(1 + u(b) - u(a));
	cout <<  (  (c % k != 0) ? ((c/k)+1) : c / k ) << endl;
	return 0;
}


//Divisibility
#include<iostream>
#include<Windows.h>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	// آلهى تنشكى ف معاميعك
	//system("mode 150,150");
	u k, a, b, c,aa,bb;
	cin >> k >> a >> b;
	aa = a; bb = b;
	a = ceil(double(a) / double(k))*k; b = ceil(double(b) / double(k))*k;
	if(a < aa)a++;
	if (b>bb)b--;
	cout << a << " " << b << endl;
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
	if (k<a && k>b){ cout << 0 << endl; return 0; }
		c = 1 + b - a;
		//cout << c <<" " <<c/k<<" " <<a<<" " <<b<< endl;
		cout << ((c % k==0) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
typedef unsigned long long uu;
void main(){
	u k, a, b,c;
	cin >> k >> a >> b;
	c = u(1 + u(b) - u(a));
	cout <<  (  (c % k != 0) ? ((c/k)+1) : c / k ) << endl;
	return;
}


//Divisibility
#include<iostream>
#include<cmath>
using namespace std;
typedef signed long long u;
int main(){
	u k, a, b=a=k=0, c;
	cin >> k >> a >> b;

	if (abs(a) != abs(b)){
		for (a; (a%k != 0 && a<b); a++);
		for (b; (b%k != 0 && b>a); b--);
	}
	if (a == b){

		cout << ((a % k == 0) ? 1 : 0) << endl; return 0;
	}
		//cout << a << " " << b << endl;
		c = 1 + b - a;
		cout << c << endl;
		cout << ((c >= k) ? (/*cout << " 1 : ",*/ c / k) : (/*cout << " 2 : ",*/ (c / k)+1) ) << endl;
}


//Divisibility
#include<iostream>
using namespace std;
int main(){
	//signed long long k, a, b, i = 0, c = 0;
//	while (true){
		signed long long k, a, b, i , c = 0,m;
		cin >> k >> a >> b;
		if (k == 0 || k == 1){
			cout << b - a + 1 << endl; return 0;
			//continue;
		}
		for (m = a; m%k != 0; m++); i = m/k;

		while (true){
			if (k*i <= b&&k*i >= a){ c++; }
			//cout << k*i << " ";
			i++;
			if (k*i > b)break;
		}
		cout << c << endl;
	//}
}


#include<bits/stdc++.h>
using namespace std;
typedef long long l1;
int main()
{
    l1 a,b,c;
    cin>>a>>b>>c;
    l1 x=abs(b-c);
    l1 sum=x/a;
    if(b%a==0 || c%a==0)
        sum++;
    cout<<sum<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long l1;
int main()
{
    l1 a,b,c;
    cin>>a>>b>>c;
    l1 x=abs(b-c);
    if(b%2==0 || c%2==0)
        x++;
    l1 sum=ceil((double)x/(double)a);
    cout<<sum<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long l1;
int main()
{
    l1 a,b,c;
    cin>>a>>b>>c;
    l1 x=abs(b-c)+1;
    l1 sum=ceil((double)x/(double)a);
    cout<<sum<<endl;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
  //  while(1){
    int k,a,b;
    cin>>k>>a>>b;
    int count1=0;
    if(a>=0 && b>=0){
        int x1;
        if(a==0){
            count1++;
            x1=0;
        }
        else{
            x1=(a-1)/k;
        }
        int x=b/k;
        count1+=abs(x-x1);
    }
    if(a<0 && b>=0){
       // if(b==0)
        count1++;
        int p=(-1)*a;
        int x=p/k;
        count1+=x;
        count1+=b/k;
    }
    if(a<0 && b<0)
    {
        int p=(-1)*a;
        int p1=(-1)*b;
        int x=p/k;
        int x1=(p1-1)/k;
        count1+=abs(x1-x);
    }
    cout<<count1<<endl;
  //  }
}


#include<bits/stdc++.h>
using namespace std;
typedef long long l1;
int main()
{
    l1 a,b,c;
    cin>>a>>b>>c;
    l1 x=abs(b-c);
    if(b%a==0 || c%a==0)
        x++;
    l1 sum=ceil((double)x/(double)a);
    cout<<sum<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long l1;
int main()
{
    l1 a,b,c;
    cin>>a>>b>>c;
    l1 sum=0;
    if(b<0 && c>0 || b%a==0){
        sum++;
    }
    l1 x=(-1)*b,y=(-1)*c;
    sum=sum+abs(y/a-x/a);
    cout<<sum<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long l1;
int main()
{
    l1 a,b,c;
    cin>>a>>b>>c;
    l1 sum=0;
    if(b<0 && c>=0 || b%a==0){
        sum++;
    }
    l1 x=(-1)*b,y=(-1)*c;
    sum=sum+abs(y/a-x/a);
    cout<<sum<<endl;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long l1;
int main()
{
    l1 a,b,c;
    cin>>a>>b>>c;
    l1 sum=0;
    if(b<0 && c>=0 || b%a==0 || c%a==0){
        sum++;
    }
    l1 x=(-1)*b,y=(-1)*c;
    sum=sum+abs(y/a-x/a);
    cout<<sum<<endl;
}


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
       cout<<(b/k-a/k +((a%k==0)&&a>=0)+((b%k==0)&&b<=0&&a<0)||(a<0&&b>0));

    }


#include <bits/stdc++.h>
using namespace std;
int main(){
    long long k,a,b; cin>>k>>a>>b;
    cout<<((b-a)/2)+1;
}


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
       cout<<(b/k-a/k +((a%k==0)&&a>=0)||((b%k==0)&&b<=0&&a<0)||(a<0&&b>0));

    }


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
        cout<<((b/k-a/k +1));

    }


#include <bits/stdc++.h>
using namespace std;
int main(){
    int   k,a,b; cin>>k>>a>>b;
    cout<<((b/k-a/k)+(a%k==0));
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    int   k,a,b; cin>>k>>a>>b;
    cout<<(((b-a)/k)+(a%k==0));
}


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
       cout<<(b/k-a/k +((a%k==0)&&a>=0)+((b%k==0)&&b<=0&&a<0)+(a<0&&b>0));

    }


#include <bits/stdc++.h>
using namespace std;
int main(){
    long long int k,a,b; cin>>k>>a>>b;
    cout<<((b-a)/2)+1;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    long long  k,a,b; cin>>k>>a>>b;
    cout<<((b-a)/k)+1;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    int k,a,b; cin>>k>>a>>b;
    cout<<((b-a)/2)+1;
}


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
       cout<<(b/k-a/k +((a%k==0)||(b%k==0)));

    }


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
        cout<<(b/k-a/k +((a+b)%k==0));

    }


#include <bits/stdc++.h>
using namespace std;
int main(){
    long long   k,a,b; cin>>k>>a>>b;
    cout<<((b/k-a/k)+(a%k==0));
}


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
       cout<<(b/k-a/k +(a%k==0)||(b%k==0));

    }


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
        cout<<(b/k-a/k +((-a+b)%k==0));

    }


    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        long long  k,a,b; cin>>k>>a>>b;
       cout<<(b/k-a/k +(a%k==0)+(b%k==0));

    }


#include <bits/stdc++.h>
using namespace std;
int main(){
    int   k,a,b; cin>>k>>a>>b;
    cout<<(((b-a)/k)+((b-a)%k==0));
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    cin>>k>>a>>b;
    if(a==0 && b==0){
        cout<<1;
        return 0;
    }
    if(a==b && a!=k){
        cout<<0;
        return 0;
    }

    if(a!=1 || a!=-1){
        while(a%k){
        a++;
        }
    }
    if(b!=1 || b!=-1){
        while(b%k){
        b--;
        }
    }

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    int x;
    cin>>k>>a>>b;

    if(a==b && a%k!=0){
        cout<<0;
        return 0;
    }

    long long t1,t2;
    if(a!=1){
        t1=a/k;
        a=t1*k;
    }
    if(b!=1){
        t2=b/k;
        b=t2*k;
    }

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    int x;
    cin>>k>>a>>b;

    if(k==1){
        cout<<(b-a)/k + 1<<endl;
        return 0;
    }

    if((k>b && k>a) || (k<a && k<b)){
        cout<<"0";
        return 0;
    }

    if(a==b && a%k!=0){
        cout<<0;
        return 0;
    }

    long long t1,t2;
    if(a!=1 && a%k!=0){
        t1=a/k;

        if(b>0 && a>0){
            a=t1*k+1;
        }else{
            a=t1*k;
        }
    }
    if(b!=1 && b%k!=0){
        t2=b/k;
        if(b<0 && a<0){
            b=t2*k-1;
        }else{
            b=t2*k;
        }
    }

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    cin>>k>>a>>b;
    long long cont=0;
    while(a%k && a<=b){
        a++;
    }
    cont++;
    while(a<=b){
        a=a+k;
        cont++;
    }
    cout<<cont-1<<endl;

    return 0;

}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    int x;
    cin>>k>>a>>b;

    if(a==b && a%k!=0){
        cout<<0;
        return 0;
    }
    long long t1;
    long long t2;
    if(a==1 || a==-1){
        t1=1;
    }else{
        t1=a/k;
    }
    if(b==1 || b==-10){
        t2=1;
    }else{
        t2=b/k;
    }

    a=t1*k;

    b=t2*k;

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    int x;
    cin>>k>>a>>b;

    if(k==1){
        cout<<(b-a)/k + 1<<endl;
        return 0;
    }
    if(a==b && a%k!=0){
        cout<<0;
        return 0;
    }

    long long t1,t2;
    if(a!=1 && a%k!=0){
        t1=a/k;

        if(b>0 && a>0){
            a=t1*k+1;
        }else{
            a=t1*k;
        }
    }
    if(b!=1 && b%k!=0){
        t2=b/k;
        if(b<0 && a<0){
            b=t2*k-1;
        }else{
            b=t2*k;
        }
    }

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>
#include <cmath>

using namespace std;

int main(){

    long long k,a,b;
    int x;
    cin>>k>>a>>b;

    if(k==1){
        cout<<(b-a)/k + 1<<endl;
        return 0;
    }

    if(k>abs(b) && k>abs(a)){
        if(a==0 || b==0){
            cout<<"1";
            return 0;
        }else if(a<0 && b>0){
            cout<<"1";
            return 0;
        }
        cout<<"0";
        return 0;
    }

    if(a==b && a%k!=0){
        cout<<0;
        return 0;
    }

    long long t1,t2;
    if(a!=1 && a%k!=0){
        t1=a/k;

        if(b>0 && a>0){
            a=t1*k+1;
        }else{
            a=t1*k;
        }
    }
    if(b!=1 && b%k!=0){
        t2=b/k;
        if(b<0 && a<0){
            b=t2*k-1;
        }else{
            b=t2*k;
        }
    }

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    cin>>k>>a>>b;
    cout<<cont-1<<endl;
    while(a%k){
        a++;
    }
    while(b%k){
        b--;
    }
    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    int x;
    cin>>k>>a>>b;
    if((k>b && k>a) || (k<a && k<b)){
        cout<<"0";
        return 0;
    }
    if(k==1){
        cout<<(b-a)/k + 1<<endl;
        return 0;
    }
    if(a==b && a%k!=0){
        cout<<0;
        return 0;
    }

    long long t1,t2;
    if(a!=1 && a%k!=0){
        t1=a/k;

        if(b>0 && a>0){
            a=t1*k+1;
        }else{
            a=t1*k;
        }
    }
    if(b!=1 && b%k!=0){
        t2=b/k;
        if(b<0 && a<0){
            b=t2*k-1;
        }else{
            b=t2*k;
        }
    }

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main(){

    long long k,a,b;
    int x;
    cin>>k>>a>>b;

    if(a==b && a%k!=0){
        cout<<0;
        return 0;
    }

    long long t1,t2;
    if(a!=1){
        t1=a/k;

        if(b-a){
            a=t1*k+1;
        }else{
            a=t1*k;
        }
    }
    if(b!=1){
        t2=b/k;
        if(b-a<0){
            b=t2*k-1;
        }else{
            b=t2*k;
        }
    }

    cout<<(b-a)/k + 1<<endl;

    return 0;
}


#include<bits/stdc++.h>
#define DB long double
#define pii pair<int,int>
using namespace std;
const DB eps=1e-7,mul=1e5 ;
const int maxn=200000+10 ;

int dcmp(DB x)
{
    if(fabsl(x)<eps) return 0 ;
    return x>0 ? 1 : -1 ;
}

struct pt
{
    DB x,y ;
    bool operator < (const pt &rhs) const
    {
        if(!dcmp(x-rhs.x)) return y<rhs.y ;
        return x<rhs.x ;
    }
};

pt operator + (const pt &a,const pt &b) { return (pt){a.x+b.x,a.y+b.y} ; }
pt operator - (const pt &a,const pt &b) { return (pt){a.x-b.x,a.y-b.y} ; }
pt operator * (const pt &a,const DB &d) { return (pt){d*a.x,d*a.y} ; }
bool operator == (const pt &a,const pt &b) { return !dcmp(a.x-b.x) && !dcmp(a.y-b.y) ; }

DB dot(const pt &a,const pt &b) { return a.x*b.x + a.y*b.y ; }
DB cross(const pt &a,const pt &b) { return a.x*b.y - a.y*b.x ; }
DB cross(const pt &a,const pt &b,const pt &c) { return cross(b-a,c-a) ; }

typedef vector<pt> poly ;
pt st[maxn] ;
void convex_hull(poly &v,poly &p)
{
    p.clear() ;
    sort(v.begin(),v.end()) ;
    v.resize(unique(v.begin(),v.end())-v.begin()) ;
    int n=v.size() ;
    int sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i]))<0)
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=0;i<sz;i++) p.push_back(st[i]) ;

    sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i])>0))
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=sz-1;i>=0;i--)
    {
        if(i==sz-1 && st[i]==p.back()) continue ;
        if(i==0 && st[i]==p[0]) continue ;
        p.push_back(st[i]) ;
    }
}

poly a,b ;
set<pii> ans ;
int x[maxn],y[maxn] ;
main()
{
    int n ; scanf("%d",&n) ;
    for(int i=1;i<=n;i++)
    {
        scanf("%d%d",&x[i],&y[i]) ;
        a.push_back((pt){mul/x[i],mul/y[i]}) ;
    }
    convex_hull(a,b) ;
    for(int i=0;i<b.size();i++)
    {
        if(i && dcmp(b[i-1].y-b[i].y)<=0) break ;
        int x0=int(mul/b[i].x+0.5) , y0=int(mul/b[i].y+0.5) ;
        ans.insert((pii){x0,y0}) ;
    }
    for(int i=1;i<=n;i++) if(ans.count((pii){x[i],y[i]}))
        printf("%d ",i) ;
    printf("\n") ;
}


#include<bits/stdc++.h>
#define DB double
#define pii pair<int,int>
using namespace std;
const DB eps=1e-13,mul=1e4 ;
const int maxn=200000+10 ;

int dcmp(DB x)
{
    if(fabs(x)<eps) return 0 ;
    return x>0 ? 1 : -1 ;
}

struct pt
{
    DB x,y ;
    bool operator < (const pt &rhs) const
    {
        if(!dcmp(x-rhs.x)) return y<rhs.y ;
        return x<rhs.x ;
    }
};

pt operator + (const pt &a,const pt &b) { return (pt){a.x+b.x,a.y+b.y} ; }
pt operator - (const pt &a,const pt &b) { return (pt){a.x-b.x,a.y-b.y} ; }
pt operator * (const pt &a,const DB &d) { return (pt){d*a.x,d*a.y} ; }
bool operator == (const pt &a,const pt &b) { return !dcmp(a.x-b.x) && !dcmp(a.y-b.y) ; }

DB dot(const pt &a,const pt &b) { return a.x*b.x + a.y*b.y ; }
DB cross(const pt &a,const pt &b) { return a.x*b.y - a.y*b.x ; }
DB cross(const pt &a,const pt &b,const pt &c) { return cross(b-a,c-a) ; }

typedef vector<pt> poly ;
pt st[maxn] ;
void convex_hull(poly &v,poly &p)
{
    p.clear() ;
    sort(v.begin(),v.end()) ;
    v.resize(unique(v.begin(),v.end())-v.begin()) ;
    int n=v.size() ;
    int sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i]))<0)
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=0;i<sz;i++) p.push_back(st[i]) ;

    sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i])>0))
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=sz-1;i>=0;i--)
    {
        if(i==sz-1 && st[i]==p.back()) continue ;
        if(i==0 && st[i]==p[0]) continue ;
        p.push_back(st[i]) ;
    }
}

poly a,b ;
set<pii> ans ;
int x[maxn],y[maxn] ;
main()
{
    int n ; scanf("%d",&n) ;
    for(int i=1;i<=n;i++)
    {
        scanf("%d%d",&x[i],&y[i]) ;
        a.push_back((pt){mul/x[i],mul/y[i]}) ;
    }
    convex_hull(a,b) ;
    for(int i=0;i<b.size();i++)
    {
        if(i && dcmp(b[i-1].y-b[i].y)<=0) break ;
        int x0=int(mul/b[i].x+0.5) , y0=int(mul/b[i].y+0.5) ;
        ans.insert((pii){x0,y0}) ;
    }
    for(int i=1;i<=n;i++) if(ans.count((pii){x[i],y[i]}))
        printf("%d ",i) ;
    printf("\n") ;
}


#include<bits/stdc++.h>
#define DB double
#define pii pair<int,int>
using namespace std;
const DB eps=1e-7,mul=1e4 ;
const int maxn=200000+10 ;

int dcmp(DB x)
{
    if(fabs(x)<eps) return 0 ;
    return x>0 ? 1 : -1 ;
}

struct pt
{
    DB x,y ;
    bool operator < (const pt &rhs) const
    {
        if(!dcmp(x-rhs.x)) return y<rhs.y ;
        return x<rhs.x ;
    }
};

pt operator + (const pt &a,const pt &b) { return (pt){a.x+b.x,a.y+b.y} ; }
pt operator - (const pt &a,const pt &b) { return (pt){a.x-b.x,a.y-b.y} ; }
pt operator * (const pt &a,const DB &d) { return (pt){d*a.x,d*a.y} ; }
bool operator == (const pt &a,const pt &b) { return !dcmp(a.x-b.x) && !dcmp(a.y-b.y) ; }

DB dot(const pt &a,const pt &b) { return a.x*b.x + a.y*b.y ; }
DB cross(const pt &a,const pt &b) { return a.x*b.y - a.y*b.x ; }
DB cross(const pt &a,const pt &b,const pt &c) { return cross(b-a,c-a) ; }

typedef vector<pt> poly ;
pt st[maxn] ;
void convex_hull(poly &v,poly &p)
{
    p.clear() ;
    sort(v.begin(),v.end()) ;
    v.resize(unique(v.begin(),v.end())-v.begin()) ;
    int n=v.size() ;
    int sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i]))<0)
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=0;i<sz;i++) p.push_back(st[i]) ;

    sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i])>0))
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=sz-1;i>=0;i--)
    {
        if(i==sz-1 && st[i]==p.back()) continue ;
        if(i==0 && st[i]==p[0]) continue ;
        p.push_back(st[i]) ;
    }
}

poly a,b ;
set<pii> ans ;
int x[maxn],y[maxn] ;
main()
{
    int n ; scanf("%d",&n) ;
    for(int i=1;i<=n;i++)
    {
        scanf("%d%d",&x[i],&y[i]) ;
        a.push_back((pt){mul/x[i],mul/y[i]}) ;
    }
    convex_hull(a,b) ;
    for(int i=0;i<b.size();i++)
    {
        if(i && dcmp(b[i-1].y-b[i].y)<=0) break ;
        int x0=int(mul/b[i].x+0.5) , y0=int(mul/b[i].y+0.5) ;
        ans.insert((pii){x0,y0}) ;
    }
    for(int i=1;i<=n;i++) if(ans.count((pii){x[i],y[i]}))
        printf("%d ",i) ;
    printf("\n") ;
}


#include<bits/stdc++.h>
#define DB double
#define pii pair<int,int>
using namespace std;
const DB eps=1e-15,mul=1e4 ;
const int maxn=200000+10 ;

int dcmp(DB x)
{
    if(fabs(x)<eps) return 0 ;
    return x>0 ? 1 : -1 ;
}

struct pt
{
    DB x,y ;
    bool operator < (const pt &rhs) const
    {
        if(!dcmp(x-rhs.x)) return y<rhs.y ;
        return x<rhs.x ;
    }
};

pt operator + (const pt &a,const pt &b) { return (pt){a.x+b.x,a.y+b.y} ; }
pt operator - (const pt &a,const pt &b) { return (pt){a.x-b.x,a.y-b.y} ; }
pt operator * (const pt &a,const DB &d) { return (pt){d*a.x,d*a.y} ; }
bool operator == (const pt &a,const pt &b) { return !dcmp(a.x-b.x) && !dcmp(a.y-b.y) ; }

DB dot(const pt &a,const pt &b) { return a.x*b.x + a.y*b.y ; }
DB cross(const pt &a,const pt &b) { return a.x*b.y - a.y*b.x ; }
DB cross(const pt &a,const pt &b,const pt &c) { return cross(b-a,c-a) ; }

typedef vector<pt> poly ;
pt st[maxn] ;
void convex_hull(poly &v,poly &p)
{
    p.clear() ;
    sort(v.begin(),v.end()) ;
    v.resize(unique(v.begin(),v.end())-v.begin()) ;
    int n=v.size() ;
    int sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i]))<0)
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=0;i<sz;i++) p.push_back(st[i]) ;

    sz=0 ;
    for(int i=0;i<n;i++)
    {
        while(sz>=2 && dcmp(cross(st[sz-2],st[sz-1],v[i])>0))
            sz-- ;
        st[sz++]=v[i] ;
    }
    for(int i=sz-1;i>=0;i--)
    {
        if(i==sz-1 && st[i]==p.back()) continue ;
        if(i==0 && st[i]==p[0]) continue ;
        p.push_back(st[i]) ;
    }
}

poly a,b ;
set<pii> ans ;
int x[maxn],y[maxn] ;
main()
{
    int n ; scanf("%d",&n) ;
    for(int i=1;i<=n;i++)
    {
        scanf("%d%d",&x[i],&y[i]) ;
        a.push_back((pt){mul/x[i],mul/y[i]}) ;
    }
    convex_hull(a,b) ;
    for(int i=0;i<b.size();i++)
    {
        if(i && dcmp(b[i-1].y-b[i].y)<=0) break ;
        int x0=int(mul/b[i].x+0.5) , y0=int(mul/b[i].y+0.5) ;
        ans.insert((pii){x0,y0}) ;
    }
    for(int i=1;i<=n;i++) if(ans.count((pii){x[i],y[i]}))
        printf("%d ",i) ;
    printf("\n") ;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 200514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
vector<int>e[N];
int ans[N],at;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		e[i+1].clear();
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			e[t].push_back(i+1);
			continue;
		}
		d[dt++]=(dot){10000.0/x,10000.0/y,i+1};
		mp[pp]=i+1;
		e[i+1].push_back(i+1);
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<0;ct++);
	/////////////////////
	at=0;
	for(int i=st;i<ct;i++){
		for(auto it:e[tb[i].id]){
			ans[at++]=it;
		}
	}
	sort(ans,ans+at);
	for(int i=0;i<at;i++)printf("%d ",ans[i]);
	puts("");
}
int main(){
	RI(n);
	sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 200514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		bad[i]=0;
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			bad[t]=1;
			continue;
		}
		d[dt++]=(dot){10000/x,10000/y,i+1};
		mp[pp]=i+1;
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	sort(tb+st,tb+ct,cmp2);
	for(int i=st;i<ct;i++)if(!bad[tb[i].id])printf("%d ",tb[i].id);
	puts("");
}
int main(){
	RI(n);
	sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 100514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		bad[i]=0;
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			bad[t]=1;
			continue;
		}
		d[dt++]=(dot){1.0/x,1.0/y,i+1};
		mp[pp]=i+1;
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=n-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	for(int i=st;i<ct;i++)if(!bad[tb[i].id])printf("%d ",tb[i].id);puts("");
}
int main(){
	while(RI(n)!=EOF)sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 200514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		bad[i]=0;
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			bad[t]=1;
			continue;
		}
		d[dt++]=(dot){1.0/x,1.0/y,i+1};
		mp[pp]=i+1;
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	sort(tb+st,tb+ct,cmp2);
	for(int i=st;i<ct;i++)if(!bad[tb[i].id])printf("%d ",tb[i].id);
	puts("");
}
int main(){
	RI(n);
	sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 100514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		bad[i]=0;
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			bad[t]=1;
			continue;
		}
		d[dt++]=(dot){1.0/x,1.0/y,i+1};
		mp[pp]=i+1;
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	sort(tb+st,tb+ct,cmp2);
	for(int i=st;i<ct;i++)if(!bad[tb[i].id])printf("%d ",tb[i].id);
	puts("");
}
int main(){
	while(RI(n)!=EOF)sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 200514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
vector<int>e[N];
int ans[N],at;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		e[i+1].clear();
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			e[t].push_back(i+1);
			continue;
		}
		d[dt++]=(dot){100000.0/x,100000.0/y,i+1};
		mp[pp]=i+1;
		e[i+1].push_back(i+1);
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	at=0;
	for(int i=st;i<ct;i++){
		for(auto it:e[tb[i].id]){
			ans[at++]=it;
		}
	}
	sort(ans,ans+at);
	for(int i=0;i<at;i++)printf("%d ",ans[i]);
	puts("");
}
int main(){
	RI(n);
	sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 100514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		bad[i]=0;
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			bad[t]=1;
			continue;
		}
		d[dt++]=(dot){1.0/x,1.0/y,i+1};
		mp[pp]=i+1;
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	for(int i=st;i<ct;i++)if(!bad[tb[i].id])printf("%d ",tb[i].id);puts("");
}
int main(){
	while(RI(n)!=EOF)sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 200514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		bad[i]=0;
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			bad[t]=1;
			continue;
		}
		d[dt++]=(dot){10000.0/x,10000.0/y,i+1};
		mp[pp]=i+1;
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	sort(tb+st,tb+ct,cmp2);
	for(int i=st;i<ct;i++)if(!bad[tb[i].id])printf("%d ",tb[i].id);
	puts("");
}
int main(){
	RI(n);
	sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 100514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct;
int n;
void sol(){
	for(int i=0;i<n;i++){
		int x,y;
		RII(x,y);
		d[i]=(dot){1.0/x,1.0/y,i+1};
	}
	sort(d,d+n,cmp);
	int st=0;
	ct=0;
	for(int i=n-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	for(int i=st;i<ct;i++)printf("%d ",tb[i].id);puts("");
}
int main(){
	while(RI(n)!=EOF)sol();
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define RI(x) scanf("%d",&(x))
#define RII(x,y) scanf("%d %d",&(x),&(y))
#define RI64(x) scanf("%I64d",&(x))
#define RII64(x,y) scanf("%I64d%I64d",&(x),&(y))
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(),(x).end()
#define pritnf printf
#define N 200514
using namespace std;
typedef long long int lnt;
typedef double dou;
const dou eps=1e-12;
int sgn(dou k){return (k>-eps)-(k<eps);}
typedef struct{dou x,y;int id;}dot;

dot operator-(dot a,dot b){return(dot){a.x-b.x,a.y-b.y};}
dot operator+(dot a,dot b){return(dot){a.x+b.x,a.y+b.y};}
dot operator*(dou k,dot a){return(dot){a.x*k,a.y*k};}

dou operator*(dot a,dot b){return a.x*b.y-a.y*b.x;}
dou atan2(dot a){return atan2(a.y,a.x);}
int cmp(dot a,dot b){
	return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int cmp2(dot a,dot b){return a.id<b.id;}
dot d[N],tb[N];int ct,dt;
int n,bad[N];
map<pair<int,int>,int>mp;
vector<int>e[N];
int ans[N],at;
void sol(){
	mp.clear();
	dt=0;
	for(int i=0;i<n;i++){
		e[i+1].clear();
		int x,y;
		RII(x,y);
		pair<int,int>pp=pair<int,int>(x,y);
		int t=mp[pp];
		if(t){
			e[t].push_back(i+1);
			continue;
		}
		d[dt++]=(dot){10000.0/x,10000.0/y,i+1};
		mp[pp]=i+1;
		e[i+1].push_back(i+1);
	}
	sort(d,d+dt,cmp);
	int st=0;
	ct=0;
	for(int i=dt-1;i>=0;i--){
		for(;ct>=2&&sgn((tb[ct-1]-tb[ct-2])*(d[i]-tb[ct-1]))>=0;ct--);
		tb[ct++]=d[i];
	}
	for(;ct-st>=2&&sgn(atan2(tb[st]-tb[st+1]))>=0;st++);
	for(;ct-st>=2&&sgn(atan2(tb[ct-1]-tb[ct-2])-acos(-1)/2.0)<=0;ct++);
	/////////////////////
	at=0;
	for(int i=st;i<ct;i++){
		for(auto it:e[tb[i].id]){
			ans[at++]=it;
		}
	}
	sort(ans,ans+at);
	for(int i=0;i<at;i++)printf("%d ",ans[i]);
	puts("");
}
int main(){
	RI(n);
	sol();
	return 0;
}