#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int inf = 0x3f3f3f3f;
const int mod = 1e6 + 3;
const int maxn = 100000 + 10;
long long fact[mod];
void init() {
  fact[0] = 1;
  for (int i = 1; i < mod; i++) {
    fact[i] = fact[i - 1] * i % mod;
  }
}
long long mypow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    b >>= 1;
    a = a * a % mod;
  }
  return ans;
}
long long inv(long long x) { return mypow(x, mod - 2); }
int main() {
  long long n, k;
  cin >> n >> k;
  if (n < 64) {
    long long p = 1;
    for (int i = 0; i < n; i++) p *= 2;
    if (k > p) {
      cout << "1 1" << endl;
      return 0;
    }
  }
  init();
  long long m = n;
  for (long long i = 2; i <= k - 1; i *= 2) {
    m += (k - 1) / i;
  }
  if (k <= m / n) m = n * k;
  long long fz, fm;
  fm = mypow(mypow(2, n), k) * inv(mypow(2, m)) % mod;
  if (k >= mod) {
    cout << fm << ' ' << fm << endl;
  } else {
    fz = 1;
    long long p = mypow(2, n);
    for (int i = 0; i < k; i++) {
      fz = fz * (p - i) % mod;
    }
    fz = fz * inv(mypow(2, m)) % mod;
    cout << ((fm - fz) % mod + mod) % mod << ' ' << fm << endl;
  }
}
