#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;
const double pi = acos(-1);

int n, xa, ya, xb, yb;

struct Point{
    double x, y;
    Point(double x = 0, double y = 0):x(x),y(y){}
};
typedef Point Vector;

Vector Rotate(Vector A, double rad){//rad为弧度 且为逆时针旋转的角
    return Vector(A.x*cos(rad)-A.y*sin(rad), A.x*sin(rad)+A.y*cos(rad));
}

int main()
{
    scanf("%d%d%d%d%d", &n, &xa, &ya, &xb, &yb);
    double xmid = (xa + xb) / 2.0;
    double ymid = (ya + yb) / 2.0;
    Vector v(xa - xmid, ya - ymid);
    Vector ans = Rotate(v, 2 * pi / n);
    printf("%.9lf %.9lf\n", ans.x + xmid, ans.y + ymid);
    return 0;
}

#include <bits/stdc++.h>
#define ull unsigned long long
#define int long long
#define ll long long
#define fr(i, n) for (int i = 0; i < n; i++)
#define frf(i, j, n) for (int i = j; i <= n; i++)
#define frd(i, n) for (int i = n; i >= 0; i--)
#define mp(i, j) make_pair(i, j)
#define pb(x) push_back(x)
#define INF 1e18
#define all(x) (x).begin(), x.end()
#define int64_t 64
using namespace std;
typedef pair<int, int> pi;
const int MAX = 1e6 + 1;
// typedef vector<vector<ll>> matrix;
const ll PRIME = 1e9 + 7;
#define PI 3.14159265
// typedef pair<int, pair<int, int>> ppi;
// const ll MAX = 1e6 + 1;
int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
int h,w,x,b;
int a[16][16],ans;
void go(int x,int b)
{
    if(x==0 && b==0)
    {
        ans++;
    }
    int I,J;
    bool flag=0;
    fr(i,h)
    {
        fr(j,w)
        {
            if(a[i][j]==-1)
            {
                I=i;
                J=j;
                flag=1;
                break;
                
            }
        }
        if(flag)break;
    }
    if(x>0 && a[I][J]==-1 && J+1<w &&a[I][J+1]==-1)
    {
        a[I][J+1]=1;
        a[I][J]=1;
        go(x-1,b);
        a[I][J+1]=-1;
         a[I][J]=-1;
    } 
     if(x>0 && a[I][J]==-1 && I+1<h &&a[I+1][J]==-1)
    {
        a[I+1][J]=1;
         a[I][J]=1;
        go(x-1,b);
        a[I+1][J]=-1;
         a[I][J]=-1;
    }
    if(b>0 && a[I][J]==-1 )
    {
        a[I][J]=1;
        go(x,b-1);
        a[I][J]=-1;
    } 
}
void solve()
{
    
    cin>>h>>w>>x>>b;
    memset(a,-1,sizeof(a));
     go(x,b);
     cout<<ans;
}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int t;
    t = 1;
    // cin >> t;

    // int k=1;
    while (t--)
    {
        // cout << "Case #" << k++ << ": ";
        solve();
    }
}