#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e6 + 3;
long long power(long long base, long long exp) {
  long long ans = 1;
  while (exp) {
    if (exp & 1) ans = (base * ans) % MOD;
    base = (base * base) % MOD;
    exp >>= 1;
  }
  return ans;
}
int main() {
  long long n, k;
  cin >> n >> k;
  if (n <= 63 && k > (1LL << n)) {
    cout << "1 1";
    return 0;
  }
  long long v2 = (k - 1) - __builtin_popcountll(k - 1);
  long long ntemp = n % (MOD - 1);
  if (ntemp < 0) ntemp = ntemp + MOD - 1;
  long long ktemp = k % (MOD - 1);
  if (ktemp < 0) ktemp += MOD - 1;
  long long v2temp = v2 % (MOD - 1);
  if (v2temp < 0) v2temp += MOD - 1;
  long long exponent = (ntemp * (ktemp - 1) - v2temp) % (MOD - 1);
  if (exponent < 0) exponent += MOD - 1;
  long long denom = power(2, exponent);
  long long numpart = 0;
  if (k - 1 >= MOD)
    numpart = 0;
  else {
    long long prod = 1;
    long long ntemp2 = power(2, ntemp);
    prod = power(2, v2temp);
    prod = power(prod, MOD - 2);
    if (prod < 0) prod += MOD;
    for (long long y = 1; y <= k - 1; y++) prod = prod * (ntemp2 - y) % MOD;
    numpart = prod;
  }
  long long num = denom - numpart;
  num = num % MOD;
  if (num < 0) num += MOD;
  denom = denom % MOD;
  if (denom < 0) denom += MOD;
  cout << num << " " << denom;
  return 0;
}
