<|instruction|>
Solve the below problem. The solution should start with an abridged problem statement. Then key observations. Then full solution based on the observations. Then C++ and Python implementations with comments.

112. ab-ba

time limit per test: 0.25 sec.
memory limit per test: 4096 KB


You are given natural numbers a and b. Find ab-ba.


Input

Input contains numbers a and b (1≤a,b≤100).


Output

Write answer to output.


Sample Input

2 3
Sample Output

-1

<|response|>
1. Abridged Problem Statement  
Given two integers a and b (1 ≤ a, b ≤ 100), compute and print the value of aᵇ − bᵃ. The result may be negative and can have up to ~200 decimal digits.

2. Key Observations  
- Even for a,b up to 100, aᵇ and bᵃ can be extremely large (on the order of 10²⁰⁰), far beyond 64-bit.  
- Any language solution must use arbitrary-precision (big-integer) arithmetic.  
- Python’s built-in int handles big integers natively.  
- In C++, one can use Boost.Multiprecision’s cpp_int or implement a custom bigint class.  
- Exponentiation by repeated multiplication (O(exponent) multiplications) is fine for exponents ≤100. You may also use fast binary exponentiation (O(log exponent) multiplications), but it’s not strictly necessary here.

3. Full Solution Approach  
a) Read input integers a and b.  
b) Compute A = aᵇ using big-integer arithmetic.  
   - Initialize A = 1; loop b times, each time do A *= a.  
   - (Or implement fast power: if b is even, A = (a^(b/2))²; if odd, A = a·a^(b−1).)  
c) Compute B = bᵃ similarly.  
d) Compute D = A − B. Because the subtraction may produce a negative result, ensure your big-integer type supports signed values.  
e) Print D in decimal form (including the minus sign if negative).  

Time complexity is trivial for a,b ≤ 100 and big-integer multiplications of ~200-digit numbers.

4. C++ Implementation with Detailed Comments  
Below we use Boost.Multiprecision for clarity. If your judge supports it, add “-lboost_system” etc. Alternatively, you can swap in any custom bigint class.

```cpp
#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using boost::multiprecision::cpp_int;

cpp_int fast_pow(cpp_int base, int exp) {
    // Binary exponentiation: O(log exp) multiplications
    cpp_int result = 1;
    while (exp > 0) {
        if (exp & 1)
            result *= base;
        base *= base;
        exp >>= 1;
    }
    return result;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int a, b;
    cin >> a >> b;

    // Compute a^b and b^a
    cpp_int A = fast_pow(cpp_int(a), b);
    cpp_int B = fast_pow(cpp_int(b), a);

    // Output A - B (may be negative)
    cpp_int D = A - B;
    cout << D << "\n";

    return 0;
}
```

Explanation of key parts:  
- We read `a` and `b` as ordinary ints.  
- We convert them to `cpp_int` when calling `fast_pow`.  
- `fast_pow` does exponentiation in O(log exp) big-integer multiplications.  
- Subtraction on `cpp_int` handles signed results out of the box.  
- Finally we stream `D` to `cout`, which prints the full decimal representation including a leading ‘-’ for negatives.

5. Python Implementation with Detailed Comments  
Python’s built-in integers support arbitrary precision and the built-in `pow` can take three arguments (`pow(x,y,mod)`), but here we just need `pow(x,y)`.

```python
# Read two integers from input
a, b = map(int, input().split())

# Compute a^b and b^a using Python's built-in big integers
# pow(x, y) returns x**y as an int of arbitrary size
A = pow(a, b)
B = pow(b, a)

# Compute the difference (can be negative) and print
print(A - B)
```

Detailed comments:  
- `map(int, input().split())` reads `a` and `b`.  
- `pow(a, b)` efficiently computes a**b using an optimized algorithm under the hood.  
- We subtract and directly `print` the result; Python handles negative signs and full precision automatically.