unittest
{
	assert( [ "1 2 1 1" ].solve == 2 );
	assert( [ "3 5 -4 -2" ].solve == -6 );
	assert( [ "-1000000000 0 -1000000000 0" ].solve == 1000000000000000000 );
}



import std.algorithm;
import std.conv;
import std.format;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto a = 0L;
	auto b = 0L;
	auto c = 0L;
	auto d = 0L;
	input.front.formattedRead!"%s %s %s %s"( a, b, c, d );
	
	return max( a * c, a * d, b * c, b * d );
}
