#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using pdd = pair<double, double>;
void cind(int &a) { scanf("%d", &a); }
void cinll(ll &a) { scanf("%lld", &a); }
void cinf(double &a) { scanf("%lf", &a); }
void printd(const int &a) { printf("%d ", a); }
void printll(const ll &a) { printf("%I64d ", a); }
void printf(const double &a) { printf("%.10f ", a); }
template <typename T>
void prvec(vector<T> v) {
  for (auto a : v) {
    cout << a << " ";
  }
}
vector<int> is_prime;
const ll base = 1e9 + 7;
vector<int> used((int)4e5 + 1);
const ll MOD = 1e6 + 3;
ll bin_pow(ll n, ll k) {
  if (k == 0) {
    return 1;
  }
  if (k % 2) {
    return (bin_pow(n, k - 1) * n) % MOD;
  } else {
    ll res = bin_pow(n, k / 2) % MOD;
    return (res * res) % MOD;
  }
}
int main() {
  ll n, k;
  cinll(n), cinll(k);
  if (n <= 63 && k > (1LL) << n) {
    cout << 1 << " " << 1 << endl;
    return 0;
  }
  ll res_num;
  ll res_den;
  ll i = 2;
  ll kol_num = 0;
  while (i <= k - 1) {
    kol_num += (k - 1) / i;
    i *= 2;
  }
  kol_num %= (MOD - 1);
  ll nmod = n % (MOD - 1);
  ll kmod = k % (MOD - 1) - 1;
  if (kmod < 0) {
    kmod += MOD - 1;
  }
  ll den_pw = (nmod * (kmod)) % (MOD - 1);
  den_pw -= kol_num;
  if (den_pw < 0) {
    den_pw += MOD - 1;
  }
  if (k >= MOD) {
    res_num = 0;
  } else {
    ll i = nmod;
    res_num = bin_pow(2, i);
    res_num = (res_num + MOD - 1) % MOD;
    for (i = 2; i <= k - 1; ++i) {
      res_num = (res_num * ((bin_pow(2, nmod) + MOD - i)) % MOD) % MOD;
    }
    res_num *= bin_pow(bin_pow(2, kol_num), MOD - 2);
    res_num %= MOD;
  }
  res_den = bin_pow(2, den_pw);
  ll num = (res_den - res_num) % MOD;
  num %= MOD;
  res_den %= MOD;
  if (num < 0) num += MOD;
  if (res_den < 0) res_den += MOD;
  cout << num << " " << res_den;
  return 0;
}
