#include <bits/stdc++.h>
using namespace std;
const int mod = 1e6 + 3;
long long n, k, num = 0, fz = 1, fm = 1;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
long long fpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
int main() {
  cin >> n >> k;
  num = 1;
  while ((1LL << num) < k) num++;
  if (num > n) {
    printf("1 1");
    return 0;
  }
  num = 0;
  for (long long i = k - 1; i >= 1; i >>= 1) num += (i >> 1);
  long long a = fpow(2, n);
  fz = 1;
  for (int i = 1; i < k; i++) {
    fz = (long long)fz * (a - i + mod) % mod;
    if (fz == 0) break;
  }
  fm = fpow(a, k - 1);
  int inv = fpow(fpow(2, num), mod - 2);
  fz = (long long)fz * inv % mod, fm = (long long)fm * inv % mod;
  fz = (fm - fz + mod) % mod;
  printf("%lld %lld", fz, fm);
  return 0;
}
