#include <iostream>
#include <cmath>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <iterator>
#include <unordered_map>
#include <unordered_set>
#include <sstream>
#include <fstream>
#include <numeric>
#include <tuple>
#include <ctime>
#include <random>

using namespace std;

#define fori(t) for(int i = 0; i < t; ++i)
#define forj(n) for(int j = 0; j < n; ++j)
#define fork(n) for(int k = 0; k < n; ++k)
#define forai(a) for(auto& i : a)
#define foraj(a) for(auto& j : a)
#define forak(a) for(auto& k : a)
#define forp(s, n, d) for(int p = s; p < n; p += d)
#define fast cin.tie(0); cout.tie(0); std::ios_base::sync_with_stdio(0);
#define pb(a) push_back(a);
#define pob(a) pop_back(a);
#define sorti(a) sort((a).begin(), (a).end());
#define sortm(a, n) sort(a, a + n);
#define reversi(a) reverse((a).begin(), (a).end());
#define all(a) (a).begin(), (a).end()
#define fi first
#define se second
#define yes cout << "Yes\n";
#define no cout << "No\n";
#define ans(a) cout << a << '\n';
#define endl cout << '\n';
#define res(a, n) (a).resize(n);
#define read(a, n) (a).resize(n); fori(n) cin >> a[i];
#define print(a) for (auto i : a) cout << i << ' ';
#define clear(a) (a).clear();
//#define int long long
//#define double long double

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<long long, long long> llll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<pair<int, int>> vii;
typedef vector<pair<int, pair<int, int>>> viii;
typedef pair<int, pair<int, int>> iii;
typedef vector<pair<long long, long long>> vllll;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef vector<bool> vb;
typedef pair<char, char> cc;
typedef pair<pair<char, char>, char> ccc;
typedef vector<char> vc;
typedef pair<int, char> ic;
typedef pair<ii, char> iic;
typedef vector<bool> vb;
typedef set<int> si;
typedef vector<vector<ii>> vvii;
typedef vector<vector<iii>> vviii;
typedef vector<vector<llll>> vvllll;

const int INF = 2147483647;
const ll LONGINF = 9223372036854775807;
const ll MOD = 1e9 + 7;

string s;
list<char> help;

void solve()
{
    int n;
    cin >> n >> s;
    string est = "";
    fori(n) help.push_back(s[i]);
    auto i = help.begin();
    while (i != help.end())
    {
        est += *i;
        if (est.size() == 3)
        {
            if (est == "fox")
            {
                auto first = i, last = i;
                --first;
                --first;
                ++last;
                auto next = help.erase(first, last);
                if (next != help.begin()) --next;
                if (next != help.begin()) --next;
                i = next;
                est = "";
            }
            else
            {
                string temp = est;
                est = "";
                est += temp[1];
                est += temp[2];
                ++i;
            }
        }
        else ++i;
    }
    ans(help.size())
}

signed main()
{
    fast
    bool mult = false;
    if (mult)
    {
        int t;
        cin >> t;
        while (t--) solve();
    }
    else solve();
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
typedef double T;

T EPS = 1e-7;

int cmp(T x, T y = 0) {
	return (x <= y + EPS) ? (x + EPS < y) ? -1 : 0 : 1;
}

struct point {
    T x, y;
    int id;

    point(T x_ = 0, T y_ = 0, int id_ = -1): x(x_), y(y_), id(id_) {}

    point operator + (const point& b) const { return point(x + b.x, y + b.y); }
    point operator - (const point& b) const { return point(x - b.x, y - b.y); }
    point operator * (T c) { return point(x*c, y*c); }
    point operator / (T c) { return point(x/c, y/c); }
};

inline T escalar(point a, point b) {
    return a.x * b.x + a.y * b.y;
}

inline T vetorial(point a, point b) {
    return a.x * b.y - a.y * b.x;
}

T angle(point p, point q, point o) {
	point u = p - o, v = q - o;
	return atan2(vetorial(u, v), escalar(u, v));
}

point rot(point p, double a) {
    return {p.x*cos(a) - p.y*sin(a), p.x*sin(a) + p.y*cos(a)};
}

int n, nmatch[110];
point p1[110], p2[110], tmp;

int main() {
    scanf("%d", &n);
    for(int i = 0; i < n; i++) {
        int x, y;
        scanf("%d %d", &x, &y);
        p1[i] = point(x, y);
    }
    for(int i = n-1; i >= 0; i--)
        p1[i] = p1[i] - p1[0];
    for(int i = 0; i < n; i++) {
        int x, y;
        scanf("%d %d", &x, &y);
        p2[i] = point(x, y);
    }
    if(n == 1) {
        puts("Yes");
        return 0;
    }
    for(int i = 0; i < n; i++) {
        point dif = p1[0] - p2[i];
        for(int j = 0; j < n; j++) {
            if(j == i) continue;
            T ang = angle(p2[j]+dif, p1[1], p1[0]);
            int flag = 0;
            for(int k = 0; k < n; k++) {
                tmp = rot(p2[k] + dif, ang);
                for(int l = 0; l < n; l++) {
                    if(escalar(tmp - p1[l], tmp - p1[l]) < EPS) {
                        if(nmatch[l]++ == 0) flag++;
                    }
                }
            }
            if(flag == n) {
                puts("Yes");
                return 0;
            }
            memset(nmatch, 0, sizeof nmatch);
        }
    }
    puts("No");
    return 0;
}
