// 入力制約確認用 #include using namespace std; using ll = long long; #define MAIN main #define TYPE_OF( VAR ) remove_const::type >::type #define UNTIE ios_base::sync_with_stdio( false ); cin.tie( nullptr ) #define CEXPR( LL , BOUND , VALUE ) constexpr const LL BOUND = VALUE #define CIN( LL , A ) LL A; cin >> A #define ASSERT( A , MIN , MAX ) assert( ( MIN ) <= A && A <= ( MAX ) ) #define CIN_ASSERT( A , MIN , MAX ) CIN( TYPE_OF( MAX ) , A ); ASSERT( A , MIN , MAX ) #define QUIT return 0 #define COUT( ANSWER ) cout << ( ANSWER ) << "\n"; #define RETURN( ANSWER ) COUT( ANSWER ); QUIT int MAIN() { UNTIE; CEXPR( ll , bound , 1000000000000000000 ); CIN_ASSERT( N , 0 , bound ); CIN_ASSERT( P , 2 , bound ); ll i_max = sqrt( P ); while( i_max * i_max > P ){ i_max--; } while( ( i_max + 1 ) * ( i_max + 1 ) <= P ){ i_max++; } for( int i = 2 ; i <= i_max ; ++i ){ assert( P % i > 0 ); } RETURN( "WA" ); }