#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;

using namespace std;

#define int long long
#define double long double

typedef tree<int, null_type, less <int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef tree<int, null_type, less_equal <int>, rb_tree_tag, tree_order_statistics_node_update> ordered_multi_set;

int inf = (int)1000 * 1000 * 1000 * 1000 * 1000 * 1000;

struct st //+=, sum
{
    vector <int> t;
    vector <int> p;

    void build(int n)
    {
        t.resize(4 * n, 0);
        p.resize(4 * n, 0);
    }

    void push(int v, int l, int r)
    {
        if (p[v] != 0)
        {
            p[v * 2 + 1] += p[v];
            p[v * 2 + 2] += p[v];
            int m = (l + r) / 2;
            t[v * 2 + 1] += (m - l + 1) * p[v];
            t[v * 2 + 2] += (r - m) * p[v];
            p[v] = 0;
        }
    }

    int get(int v, int l, int r, int ll, int rr)
    {
        if (ll > rr)
        {
            return 0;
        }
        if (l == ll && r == rr)
        {
            return t[v];
        }

        int m = (l + r) / 2;
        push(v, l, r);
        return get(v * 2 + 1, l, m, ll, min(m, rr)) +
               get(v * 2 + 2, m + 1, r, max(m + 1, ll), rr);
    }

    void update(int v, int l, int r, int ll, int rr, int x)
    {
        if (ll > rr)
        {
            return;
        }
        if (l == ll && r == rr)
        {
            t[v] += x * (r - l + 1);
            p[v] += x;
            return;
        }
        int m = (l + r) / 2;
        push(v, l, r);
        update(v * 2 + 1, l, m, ll, min(m, rr), x);
        update(v * 2 + 2, m + 1, r, max(m + 1, ll), rr, x);
        t[v] = t[v * 2 + 1] + t[v * 2 + 2];
    }
};

int mod = 1000 * 1000 * 1000 + 7;

int bin_pow(int a, int x)
{
    if (x == 0)
    {
        return 1;
    }
    if (x % 2 == 0)
    {
        return bin_pow((a * a) % mod, x / 2);
    }
    return (a * bin_pow((a * a) % mod, x / 2)) % mod;
}

int add(int a, int b)
{
    if (a + b >= mod)
    {
        return a + b - mod;
    }
    return a + b;
}

int umn(int a, int b)
{
    return (a * b) % mod;
}

int del(int a, int b)
{
    return umn(a, bin_pow(b, mod - 2));
}

void solve()
{
    int n, m;
    cin >> n >> m;
    cout << m - n << '\n';
    cout << 1 << '\n';
}

signed main()
{
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#endif

    int _ = 1;
    //cin >> _;
    while (_ --)
    {
        solve();
    }
}
