unittest
{
	assert( [ "7 3" ].parse.expand.solve == 1 );
	assert( [ "100 10" ].parse.expand.solve == 0 );
	assert( [ "1 1" ].parse.expand.solve == 0 );
}



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

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

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto nk = input.front.split.to!( int[] );
	
	return tuple( nk[ 0 ], nk[ 1 ] );
}

auto solve( in long n, in long k )
{
	if( n % k == 0 ) return 0;
	else             return 1;
}
