Function to find the required values
static void solve ( int A , int B ) { double p = B / 2.0 ; double M = Math . Ceiling ( 4 * p ) ; int N = 1 ; int O = - 2 * A ; double Q = Math . Ceiling ( A * A + 4 * p * p ) ; Console . Write ( M + " ▁ " + N + " ▁ " + O + " ▁ " + Q ) ; }