#include <bits/stdc++.h>
#define XOX
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
#define Time  cerr << "Time Taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl
#define ll  long long
#define beg() begin()

#define test int t=1; cin>>t;  while(t--)
#define vll vector<long long>
#define vi vector<int>
#define all(v) v.begin(),v.end()
#define pb push_back
#define forr(i,a,b) for (ll i = (a); i < (b); ++i)
#define rrof(i,a,b) for (ll i = (b)-1; i >= (a); --i)

#define mod 1000000007 
void solve( );
void swap(ll &a, ll &b);
ll min(ll &a, ll &b);
ll max(ll &a, ll &b);
void exp(ll b);
ll sqrt(ll a);
ll  GCD(ll a, ll b) ;

struct node{
	int freq;
	node* child[26];
	node(){
		freq=0;
		for(int i=0;i<26;i++) child[i]=NULL;
	}
};

int main() {

	fast;
	#ifndef ONLINE_JUDGE
   		freopen("input.txt", "r", stdin);
   		freopen("output.txt", "w", stdout);
	#endif
   		
   // node *root = new node() ; node *temp = root ;
   // 		string s;
   // 		cin>>s;
   // 		for(int i=0;i<s.length();i++){
   // 			 if(temp->child[(s[i]-'a')]==NULL){
   // 			 	node *t = new node(); 
   // 			 	temp->child[(s[i]-'a')] = t;
   // 			 	temp=t; temp->freq++;
   // 			 }else{
   // 			 	temp = temp->child[(s[i]-'a')];
   // 			 	temp->freq++;
   // 			 }
   // 		}
	// test{ 
	// 	string q; cin>>q;
	// 	if()

	//  }
   		solve();
Time;
 
  return 0;
} 
 
void solve(){
	ll n,s,d,x,y; cin>>n>>s>>d; 
	forr(i,0,n){
		cin>>x>>y; if(x<s && y>d ){cout<<"Yes"; return; }
	}
	cout<<"No";


 
 }
void swap(ll &a, ll &b){ 
	if(a==b) return ;

	a=a^b;
	b=a^b;
	a=a^b;
	return ;
}

ll min(ll &a, ll &b){
	if(a>b) return b;
	return a;
}
ll max(ll &a, ll &b){
	if(a<b) return b;
	return a;
}

ll sqrt(ll a){
	ll l=1,h=a, m=l+(h-l+1)/2;
	while(l<h){
		if(m > a/m ) h=m-1;
		else l=m;

		m=l+(h-l+1)/2;
	}

	return m; 
} 
ll  GCD(ll a, ll b) {
  if(b==0) return a;
  else return GCD(b, a%b) ; 
}


#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ull = unsigned long long;
using vll = vector<ll>;
using vi = vector<int>;
using vb = vector<bool>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vpll = vector<pll>;
const ll LINF = 1ll << 55;
const ll INF = 0x3f3f3f3f;
const ll MOD = 1e9 + 7;
const ll dx[] = {1, 0, -1, 0};
const ll dy[] = {0, 1, 0, -1};

/// cin/cout overloading
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &vec) {
  for (auto it = vec.begin(); it != vec.end(); ++it) {
    out << *it << " ";
  }
  return out;
}

template <typename T>
ostream &operator<<(ostream &out, const pair<T, T> &P) {
  out << P.first << " " << P.second;
  return out;
}

template <typename T>
istream &operator>>(istream &in, vector<T> &vec) {
  for (auto it = vec.begin(); it != vec.end(); ++it) {
    in >> *it;
  }
  return in;
}

template <typename T>
istream &operator>>(istream &in, pair<T, T> &P) {
  in >> P.first >> P.second;
  return in;
}

#define error(args...)                       \
  {                                          \
    string _s = #args;                       \
    replace(_s.begin(), _s.end(), ',', ' '); \
    stringstream _ss(_s);                    \
    istream_iterator<string> _it(_ss);       \
    err(_it, args);                          \
    cerr << endl;                            \
  }

void err(istream_iterator<string>) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << ", ";
  err(++it, args...);
}

#define all(x) (x).begin(), (x).end()
#define coutp(x, y) cout << (x) << " " << (y) << endl
#define coutn(x) cout << (x) << endl
#define coutd(x) cout << setprecision(10) << (x) << endl

/// main函数
int main() {
  ll N;
  cin >> N;
  ll ans = 0;
  ll sqsum = 0;
  ll sumsq = 0;
  ll A;
  for (int i = 0; i < N; ++i) {
    cin >> A;
    sqsum += A * A;
    sumsq += A;
  }
  sumsq *= sumsq;
  ans = N * sqsum - sumsq;
  coutn(ans);
  return 0;
}
