#include <bits/stdc++.h>
using namespace std;
const int mod = 1e6 + 3;
int mul(int a, int b) { return (a * 1LL * b) % mod; }
int add(int a, int b) { return (a + b) % mod; }
int sub(int a, int b) { return (mod + a - b) % mod; }
int po(int a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 0) return po(mul(a, a), b / 2);
  return mul(a, po(mul(a, a), b / 2));
}
int main() {
  long long n, k;
  scanf("%lld %lld", &n, &k);
  long long hey = 1;
  for (int j = 0; j < min((long long)60, n); j++) hey *= 2;
  if ((hey < k)) {
    printf("1 1\n");
    return 0;
  }
  int p = 1, q, c = sub(po(2, n), k - 1);
  long long d = 0;
  for (long long i = 2; i <= k - 1; i *= 2) d += (k - 1) / i;
  q = mul(po(po(2, n), k - 1), po(po(2, d), mod - 2));
  for (int i = 0; i < min(k - 1, (long long)mod); i++) {
    p = mul(p, c);
    c = add(c, 1);
  }
  p = mul(p, po(po(2, d), mod - 2));
  p = sub(q, p);
  printf("%d %d\n", p, q);
  return 0;
}
