#include<bits/stdc++.h>
using namespace std;
class rectangle
{
	private:
		int length,width;
	public:
	rectangle (int l,int h){length=l;width=h;}
	double area();		 
};
double rectangle::area(){return length*width;}
int main()
{int l,h,x,y;
cin>>l>>h>>x>>y;
rectangle m(l,h);rectangle n(x,y);
if(m.area()>n.area())cout<<1;
else cout<<0;	 
}