#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define f first
#define s second
#define pb push_back
#define pop pop_back
#define int long long int
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define mod 1000000007
#define inf 1LL<<60
int grid[16][16];
int ans;

bool check(int h,int w)
{
    for(int i=0;i<h;i++)
    {
        for(int j=0;j<w;j++)
        {
            if(grid[i][j]==-1)
                return false;
        }
    }
    return true;
}
void helper(int h,int w,int a,int b)
{

    if(a==0 && b==0)
    {
       
        if(check(h,w))
        {
            ans++;
            
        }
        
        return;
    }

    int i,j;
    bool flag=0;
    for(int x=0;x<h;x++)
    {
        for(int y=0;y<w;y++)
        {
            if(grid[x][y]==-1)
            {
                 
                i=x;
                j=y;
                flag=1;
                break;
            }
        }
        if(flag)
            break;
    }
    if(a>0 && grid[i][j]==-1 && j+1<w && grid[i][j+1]==-1)
    {
        grid[i][j]=1;
        grid[i][j+1]=1;
        helper(h,w,a-1,b);
        grid[i][j]=-1;
        grid[i][j+1]=-1;
    }

     if(a>0 && grid[i][j]==-1 && i+1<h && grid[i+1][j]==-1)
    {
        grid[i][j]=1;
        grid[i+1][j]=1;
        helper(h,w,a-1,b);
        grid[i][j]=-1;
        grid[i+1][j]=-1;
    }

      if(b>0 && grid[i][j]==-1)
    {
        grid[i][j]=1;
        helper(h,w,a,b-1);
        grid[i][j]=-1;
    }

    return;
}
int32_t main()
{
	fast;
	int h,w,a,b;

	cin>>h>>w>>a>>b;
	ans=0;
	memset(grid,-1,sizeof(grid));
	helper(h,w,a,b);
	cout<<ans;
	return 0;
}

 
#include <bits/stdc++.h>

using namespace std;

#define _for(i,a,b) for(int i = (a); i < (b); i++)
#define _rep(i,a,b) for(int i = (a); i <= (b); i++)
#define all(v) (v).begin(), (v).end()
#define nl "\n"
#define reunique(v) v.resize(std::unique(v.begin(), v.end()) - v.begin())
#define sz(v) ((int)(v).size())
//#define LOCAL

typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;

#ifdef LOCAL
//#include "pretty_print.h"
#define dbg(...) cerr << "[" << #__VA_ARGS__ << "]: ", debug_out(__VA_ARGS__)
#else
#define dbg(...) 42
#endif

template <typename T> T sqr(T x) { return x * x; }
template <typename T> T abs(T x) { return x < 0? -x : x; }
template <typename T> T gcd(T a, T b) { return b? gcd(b, a % b) : a; }
template <typename T> bool chmin(T &x, const T& y) { if (x > y) { x = y; return true; } return false; }
template <typename T> bool chmax(T &x, const T& y) { if (x < y) { x = y; return true; } return false; }

auto random_address = [] { char *p = new char; delete p; return (uint64_t) p; };
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count() * (random_address() | 1));
mt19937_64 rngll(chrono::steady_clock::now().time_since_epoch().count() * (random_address() | 1));

#define PI acos(-1)
void taskD() {
    double n, x0, y0, x1, y1;
    cin >> n >> x0 >> y0 >> x1 >> y1;
    double a = 2*PI/n;
    double xm = (x0+x1)/2;
    double ym = (y0+y1)/2;
    double x = (x0-xm)*cos(a) - (y0-ym)*sin(a)+xm;
    double y = (x0-xm)*sin(a) + (y0-ym)*cos(a)+ym;
    //cout << " PI = " << PI << "\n";
    cout << setiosflags(ios::fixed) << setprecision(11) << x << " ";
    cout << setiosflags(ios::fixed) << setprecision(11) << y << "\n";
    return;
}

int main() {
    ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
    taskD();
    //task10391();
    //task1595();
#ifdef LOCAL
    //assert(freopen("i.txt", "r", stdin));   assert(freopen("o.txt", "w", stdout));
    //freopen("i.txt", "r", stdin);   freopen("o.txt", "w", stdout);
    cerr << "Time execute: " << clock() / (double)CLOCKS_PER_SEC << " sec" << endl;
#endif
    return 0;
}

