MOD7 = int( 1e9 ) + 7 MOD1 = 101010101010101010101 N = int( input() ) A = [ [ 100, 1 ], [ 0, 1 ] ] x = [ [ 1 ], [ 1 ] ] def mat_mul( a, b, mod ): c = [ [ 0 for i in range( len( b[ 0 ] ) ) ] for j in range( len( a ) ) ] for i in range( len( a ) ): for k in range( len( a[ 0 ] ) ): for j in range( len( b[ 0 ] ) ): c[ i ][ j ] += a[ i ][ k ] * b[ k ][ j ] c[ i ][ j ] %= mod return c def mat_pow( a, n, mod ): res = [ [ 0 for i in range( len( a ) ) ] for j in range( len( a ) ) ] for i in range( len( res ) ): res[ i ][ i ] = 1 while n: if n & 1: res = mat_mul( res, a, mod ) n >>= 1 a = mat_mul( a, a, mod ) return res print( mat_mul( mat_pow( A, N - 1, MOD7 ), x, MOD7 )[ 0 ][ 0 ] ) print( mat_mul( mat_pow( A, N - 1, MOD1 ), x, MOD1 )[ 0 ][ 0 ] )