#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 2e6 + 10;
const int mod = 1000003;
long long add(long long x, long long y) {
  x += y;
  if (x >= mod) return x - mod;
  return x;
}
long long sub(long long x, long long y) {
  x -= y;
  if (x < 0) return x + mod;
  return x;
}
long long mult(long long x, long long y) {
  x %= mod;
  y %= mod;
  return (x * y) % mod;
}
long long bin_pow(long long x, long long p) {
  if (p == 0) return 1;
  if (p & 1) return mult(x, bin_pow(x, p - 1));
  return bin_pow(mult(x, x), p / 2);
}
long long inv(long long a) { return bin_pow(a, mod - 2); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  if (n <= 63 and k > (1LL << n)) {
    cout << 1 << " " << 1 << endl;
    return 0;
  }
  long long h = 0;
  for (long long i = 63; i >= 1; i--) {
    h += ((k - 1) / (1LL << i));
  }
  long long gcd = inv(bin_pow(2, h));
  long long denom = bin_pow(bin_pow(2, k - 1), n);
  long long num = 0;
  if (k - 1 < mod) {
    num = 1;
    long long exp = bin_pow(2, n);
    for (int i = 1; i <= k - 1; i++) {
      num = mult(num, sub(exp, i));
    }
  }
  num = sub(denom, num);
  num = mult(num, gcd);
  denom = mult(denom, gcd);
  cout << num << " " << denom << endl;
  return 0;
}
