#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define yes cout << "YES" << "\n";
#define no cout << "NO" << "\n";
#define fri(a,b) for(ll i = a; i<b; i++)
#define frj(a,b) for(ll j = a; j <b; j++)
#define frk(a,b) for(ll k = a; k <b; k++)
#define rfri(a,b) for(ll i = a; i>=b; i--)
using namespace std;
int main()
{
ios_base:: sync_with_stdio(false);
cin.tie(NULL);
ll T = 1;
// cin >> T;
while(T--)
{
ll x,y,n;
cin >> n;
bool ps = 0;
vector < pair <ll,ll> > v;
ll j = 0;
while(n--)
{
ll x1,y1;
cin >> x1 >> y1;
v.pb({x1,y1});
}
cin >> x >> y;
ll first = 0;
ll second = 0;
v.push_back({v[0].first,v[0].second});
fri(0,v.size()-1)
{
first += v[i].first*v[i+1].second;
}
// cout << first << "\n";
fri(0,v.size()-1)
{
second += v[i].second*v[i+1].first;
}
// cout << second << "\n";
ll bohuvuj = abs(first - second);
// cout << bohuvuj << "\n";
ll total = 0;
fri(0,v.size()-1)
{
frj(i+1,v.size() - 1)
{
vector < pair <ll,ll> > t;
t.pb({v[i].first,v[i].second});
t.pb({v[j].first, v[j].second});
t.pb({x,y});
t.pb({v[i].first,v[i].second});
ll f = 0;
ll s = 0;
for(ll k = 0 ; k< t.size()-1; k++)
{
f += t[k].first*t[k+1].second;
s += t[k].second*t[k+1].first;
}
total += abs(f-s);
}
}
if(total != bohuvuj) no
else
{
if(total != 0) yes
else
{
no
}
}
}
}