Skip to content
TheChatArchiveThe Chat Archive
DeepSeekDeepseek v3.2· deepseekHugging Face Frontier Reasoning Traces

Year 2118. Androids are in mass production for decades now, and they do all the work for…

  1. User

    Year 2118. Androids are in mass production for decades now, and they do all the work for humans. But androids have to go to school to be able to solve creative tasks. Just like humans before.

    It turns out that high school struggles are not gone. If someone is not like others, he is bullied. Vasya-8800 is an economy-class android which is produced by a little-known company. His design is not perfect, his characteristics also could be better. So he is bullied by other androids.

    One of the popular pranks on Vasya is to force him to compare x^y with y^x. Other androids can do it in milliseconds while Vasya's memory is too small to store such big numbers.

    Please help Vasya! Write a fast program to compare x^y with y^x for Vasya, maybe then other androids will respect him. Input

    On the only line of input there are two integers x and y (1 ≤ x, y ≤ 10^{9}).

    Output

    If x^y < y^x, then print '<' (without quotes). If x^y > y^x, then print '>' (without quotes). If x^y = y^x, then print '=' (without quotes).

    Examples

    Input

    5 8

    Output

    >

    Input

    10 3

    Output

    <

    Input

    6 6

    Output

    =

    Note

    In the first example 5^8 = 5 ⋅ 5 ⋅ 5 ⋅ 5 ⋅ 5 ⋅ 5 ⋅ 5 ⋅ 5 = 390625, and 8^5 = 8 ⋅ 8 ⋅ 8 ⋅ 8 ⋅ 8 = 32768. So you should print '>'.

    In the second example 10^3 = 1000 < 3^{10} = 59049.

    In the third example 6^6 = 46656 = 6^6.

  2. DeepSeek Assistant

    We are given two integers x and y (1 ≤ x, y ≤ 10^9). Need to compare x^y and y^x. Straight computation impossible due to huge numbers. We need to compare them using logarithms or algebraic manipulations.

    We want to compare x^y and y^x. Taking natural logs:

    x^y < y^x <=> y ln x < x ln y <=> (ln x)/x < (ln y)/y. So we can compare function f(t) = ln t / t. But careful: need to consider edge cases: if x=y then equality. Also if one of them is 1? Since 1^y = 1 and y^1 = y, so compare accordingly.

    We can use double with caution. However, numbers up to 1e9, ln(1e9) ~ 20.7, dividing by 1e9 yields ~2e-8, which is small. Differences might be subtle? Double has about 15-16 decimal digits of precision; comparing f(x) and f(y) should be fine. But we must be careful about floating-point inaccuracies when values are extremely close. However, we need exact comparison. Use high precision? Alternative: use comparison without floating point by taking logs and cross-multiplying: compare y ln x vs x ln y. Equivalent to compare ln(x^y) vs ln(y^x). But still need to compare doubles.

    Alternatively, we can use comparisons using integer arithmetic with exponentiation when numbers are small? But 1e9 too large.

    Another approach: Use the fact that for positive integers > e, the function f(t) = ln(t)/t is decreasing for t > e. For t < e it is increasing. But e ~ 2.718. So we can treat cases based on values.

    We can consider the inequality x^y < y^x <=> x^{1/x} < y^{1/y} (since raising both sides to power 1/(xy) yields x^(y/(xy)) = x^{1/x} and y^{1/y})? Actually: x^y <? y^x. Take both sides to power 1/(xy): (x^y)^{1/(xy)} = x^{1/x} and (y^x)^{1/(xy)} = y^{1/y}. Since the exponent 1/(xy) is positive for positive x,y, inequality direction is preserved. So we compare x^{1/x} and y^{1/y}. That's same as comparing ln(x)/x.

    So we can define f(t)=ln t / t. It increases for t in (1, e) and decreases for t > e. So we can compare by cases: If both x and y are greater than e (i.e., >=3), then larger t gives smaller f. But need to handle when one is less than or equal to 2.

    Better: Use integer comparison: ylog(x) vs xlog(y). But that's same.

    We can compute using long double in C++ to be safe. The difference may be extremely small for some pairs where x^y and y^x are very close but not equal. Are there any cases where they are equal? For positive integers, besides x=y, there is also 2^4 = 4^2 = 16. So (2,4) and (4,2) are equal. Also 2^2 = 2^2? That's equal but covered by x=y. Any other integer pairs? Known equation: x^y = y^x for distinct positive integers: (2,4) and (4,2). Also maybe (2,4) only? There is also (2,4) and (4,2). Actually there are infinite rational solutions but integer distinct only (2,4). Also (1,1) trivial. Also maybe (0) but not allowed. So equality occurs only when x=y or {x,y} = {2,4}.

    But wait: check 1^a = 1 and a^1 = a, so equality only if a=1. So (1,1) only. So besides x=y, only (2,4) and (4,2) yield equality. But double might lead to errors if values are very close but not equal? Possibly, but we can handle equality cases with explicit checks. So we can do:

    If x == y: output '='.

    Else if x == 1: then 1^y = 1 and y^x = y^1 = y. So if y == 1 would have been caught, so y>1 => 1 < y => '<' because 1^y = 1 < y^1 = y. So output '<'.

    Else if y == 1: then x^1 = x and 1^x = 1 => x > 1 => '>'.

    Else if (x == 2 and y == 4) or (x == 4 and y == 2): output '='.

    Now for other cases, we can compute using logarithms. But careful: The log function might give imprecision but we only need to decide < or >. With double, we can compute LHS = y * log(x), RHS = x * log(y). Then compare. If they are extremely close, we might get wrong due to floating error. However, given that we have handled equality cases, the difference should be significant enough? Not necessarily; there could be pairs like (e, something) where the values are close but not equal. For large numbers, the function f(t) becomes very flat. For large t, f(t) ~ ln t / t, which decreases slowly. For large x and y close to each other, say x=10^9, y=10^9-1, then f(10^9) and f(10^9-1) are extremely close. The difference in the logs product: yln(x) vs xln(y). Could the difference be so small that double miscomputes? Let's estimate.

    Let x = N, y = N+1? Actually we want to consider the worst-case where the ratio is close to 1. But we can compute the difference: We need to determine sign of y ln x - x ln y. For large x and y that are close, this difference is small relative to the magnitudes. Double has 52 bits mantissa, about 15-16 decimal digits. The numbers y ln x and x ln y are each about N ln N, which for N=1e9 is about 1e9 * 20.7 = 2.07e10. The relative precision of double for numbers of that magnitude is about 1e-15, so absolute precision about 2e10 * 1e-15 = 2e-5. So the difference between the two could be smaller than that? Possibly. For example, take x = 10^9, y = 10^9+1? Actually compute difference: let y = x+1. Compute f(x) = ln x / x, f(y) = ln y / y. The difference: f(x)-f(y). Using derivative f'(t) = (1 - ln t)/t^2. For t large, f'(t) ~ - (ln t)/t^2. So change over Δ=1 is about - (ln t)/t^2. So difference in f is about (ln t)/t^2. Then the difference in y ln x - x ln y = xy (f(x)-f(y)). Because y ln x - x ln y = xy ( (ln x)/x - (ln y)/y ) = xy (f(x)-f(y)). Actually careful: y ln x - x ln y = xy ( (ln x)/x - (ln y)/y ) = xy (f(x)-f(y)). So magnitude ≈ xy * (ln t)/t^2 = (x y ln t)/t^2. Since y ≈ x, this is about x^2 * (ln x)/x^2 = ln x. So the absolute difference is about ln x ≈ 20.7, which is not tiny! Wait that's surprising. Let's compute more accurately:

    y ln x - x ln y = xy ( ln x / x - ln y / y). For x and y close, say y = x + d with small d. Then f(x) - f(y) ≈ -f'(x) d = - (1 - ln x)/x^2 * d? Actually f'(x) = (1/x * x - ln x * 1)/x^2 = (1 - ln x)/x^2. So f(x)-f(y) ≈ -f'(x) d = - (1 - ln x)/x^2 * d. Since ln x >> 1 for x>3, f'(x) ~ - (ln x)/x^2. So f(x)-f(y) ≈ (ln x)/x^2 * d (if d negative? Let's compute sign not needed). So absolute difference = xy * |f(x)-f(y)| ≈ x^2 * (ln x)/x^2 * |d| = ln x * |d|. Since |d| is at least 1, the difference is at least ln x ≈ 20.7 for large x. That's actually fairly large! So the floating point error is small relative to that. For x=1e9, ln x ~ 20.7, so the difference is at least 20.7 for d=1. So it's well above double precision. But wait, does that hold? Let's test: x=1000000000, y=1000000001. Compute: y ln x - x ln y. Compute approximate: y = x+1, ln y = ln x + ln(1+1/x) ≈ ln x + 1/x. So y ln x - x ln y = (x+1) ln x - x (ln x + 1/x) = x ln x + ln x - x ln x - x*(1/x) = ln x - 1. Actually x*(1/x) = 1. So difference = ln x - 1. So indeed about 20.7 - 1 = 19.7. That's far from zero. So the difference is O(ln x), not tiny. So double should handle easily.

    What if x and y are swapped? The difference is symmetrical. So maybe the only problematic cases are when both numbers are small, like 2 and 3? Actually 2^3=8, 3^2=9, difference small? But log difference: 3ln2 vs 2ln3: 30.693=2.079, 21.099=2.198, difference ~0.119, not extremely small. double fine.

    Edge cases: when x or y are 0? Not allowed (min 1). So fine.

    Thus using double is safe.

    But we must consider that we compute logarithms of integers up to 1e9, which are fine.

    Alternatively, we could avoid floating point by using cross multiplication after taking logs in base 2? But then we still need to compare large exponents.

    We could compare using the fact that x^y < y^x <=> x^y / y^x < 1. But easier: compute using long double.

    Given that we handle the special equality cases, we can safely compute using double.

    One more special case: when x=2, y=3? Compare: 2^3=8, 3^2=9, so 2^3 < 3^2 => '<'. But log comparison: 3ln2=2.07944, 2ln3=2.19722 -> less. So good.

    When x=3, y=2: opposite.

    But note the equality case (2,4) we already handle. Also (4,2) equality.

    Now, is there any case where x^y = y^x for integers other than those? Let's analyze: The equation x^y = y^x for x != y. Take logs: y ln x = x ln y => ln x / x = ln y / y. Consider function f(t)=ln t / t. f is strictly increasing on (1, e] and strictly decreasing on [e, ∞). So for distinct integers, equality can happen only if one is less than e and the other greater than e, or both on different sides but same f value? Actually f is injective on each interval, but if we take one from (1,e) and one from (e,∞), they could potentially have same f. For integer values: integers in (1,e) are only 2. e ~2.718, so only 2 is less than e. For t>e, the smallest integer is 3. So we check if f(2) = ln2/2 ≈0.3466. f(3)=ln3/3≈1.0986/3=0.3662. Actually 0.3662 > 0.3466. f(4)=ln4/4≈1.3863/4=0.3466. So f(2) ≈ 0.346574, f(4)=0.346574 (since ln4=2ln2, so ln4/4=2ln2/4=ln2/2). Exactly equal: ln2/2 = (2 ln2)/4 = ln2/2. So indeed 2 and 4 yield same f. Next f(5)=ln5/5≈1.6094/5=0.3219 < f(2). So f(3) is greater. So only pair (2,4) gives equality among distinct integers. So that's it. Also consider x=1? f(1)=0/1=0. For any y>1, f(y)>0, so no equality. So we covered all.

    Thus algorithm:

    Read x, y. If x == y: print '='. Else if x == 1: print '<' (since 1^y = 1 < y^1 = y). Else if y == 1: print '>'. Else if (x == 2 and y == 4) or (x == 4 and y == 2): print '='. Else: compute a = y * log(x) (or use long double) compute b = x * log(y) if a < b: print '<' else if a > b: print '>' else print '=' (shouldn't happen except the handled cases, but for safety we could still handle).

    But careful: log of integers up to 1e9 fits in double. However, using double for a and b: y * log(x) may be up to 1e9 * log(1e9) ~ 2e10, which is within double range (max ~1e308). So fine.

    But using double might have rounding errors when numbers are close? As argued, difference is at least ~ln(min(x,y))? Actually in the case where one is 2 and the other is 4, we handled. In case where one is 2 and other is 3, difference is 0.119, which is > epsilon. But what about x=3, y=4? 3^4=81, 4^3=64, so 3^4 > 4^3. Logs: 4ln3≈41.0986=4.3944, 3ln4≈31.3863=4.1589, difference 0.2355. Good.

    So double should be fine.

    But to be extra safe, we could use long double in C++ (80-bit extended precision). In Python, we have arbitrary precision floats? Python's float is double precision. But Python's decimal or fractions? We could also use the integer comparison method: take both sides to some power? For instance, compare x^y and y^x by comparing x^y / y^x to 1, but that's equivalent.

    Another integer approach: cross multiply logs? For instance, we can compare y * log(x) vs x * log(y) by using the fact that log(x) = log2(x) * log(2). But we still need logs.

    Given the constraints and special cases, we can safely use double.

    But what about large x and y with values like 10^9 and 10^9 - 1? We already computed difference = ln(x) - 1 if y = x+1? Let's compute exactly: Suppose x = N, y = N+1: Then y ln x - x ln y = (N+1) ln N - N ln(N+1) = N ln N + ln N - N (ln N + ln(1+1/N)) = ln N - N ln(1+1/N). For large N, ln(1+1/N) ≈ 1/N - 1/(2N^2) + ... So N ln(1+1/N) ≈ 1 - 1/(2N) + ... So difference ≈ ln N - (1 - 1/(2N)) ≈ ln N - 1. So about 20.7 - 1 = 19.7 for N=1e9. That's large. So no problem.

    But consider x and y that are far apart? Then difference is even larger.

    Thus double is fine.

    We should consider potential overflow in integer multiplication if we try to compute something like y * log(x) as double, we're safe because y is integer up to 1e9 and log(x) is ~20.7, so product ~2e10, which is within double's exact integer representation? Double can represent integers exactly up to 2^53 ≈ 9e15, so fine.

    Implementation in Python:

    We can use math.log (natural log) or log10? Use natural log.

    Example:

    import sys, math

    def compare(x, y): if x == y: return '=' if x == 1: return '<' if y == 1: return '>' if (x == 2 and y == 4) or (x == 4 and y == 2): return '=' # Compute using log # To avoid floating errors, we could compare with long double? Python float is double. a = y * math.log(x) b = x * math.log(y) if abs(a - b) < 1e-12: # maybe tolerance? But we handled equality cases; still use tolerance for safety. return '=' elif a < b: return '<' else: return '>'

    But note: For large numbers, a and b are large, the absolute difference might be small relative? As we argued, difference is at least ~ln(min(x,y))? Actually for distinct (x,y) not (2,4) we should have significant difference. But we might still want to consider tolerance relative to magnitude? The difference can be as low as? Let's consider worst-case scenario where x and y are close but not equal, and one is less than e? The only integer less than e is 2. So maybe x=2,y=3? diff = 3ln2 - 2ln3 = about -0.118. That's small but > 1e-12. x=2,y=5? diff = 5ln2 - 2ln5 = 50.6931 -21.6094 = 3.4655 - 3.2188 = 0.2467 > 1e-12. So safe.

    But maybe if x=3,y=2 diff is about 0.118 > 1e-12. So all good.

    Nevertheless, we can just compare a < b without tolerance. But because of floating errors, we might get a scenario where a and b are theoretically equal but not exactly due to rounding; but we handle equality cases separately. For other cases, they are not exactly equal, but could rounding cause a and b to compare incorrectly if they are extremely close? For large numbers, the absolute difference is about ln x, which is > 0.69 (since smallest x>1 is 2 => ln2≈0.693). Actually wait, if x=2,y=3 diff ~0.118, which is > 1e-10, and double relative error is about 1e-15 * magnitude of numbers (2e10?) Actually magnitude is around 21.098? That's small. For x=2,y=3: ylog(x)=30.693=2.079, xlog(y)=2*1.099=2.198; magnitude ~2, absolute difference ~0.119. That's many orders larger than machine epsilon. So double will get correct sign.

    Consider x=2,y=1000000000: compute a = 1e9ln2 ≈ 693 million; b = 2ln(1e9) ≈ 2*20.723 = 41.446; diff huge. So no problem.

    Consider both large and close: x=10^9, y=10^9-1. Diff =? Let's compute diff = (y ln x) - (x ln y). Actually if x > y, we might have negative diff. Compute: x = N, y = N-1. Then y ln x - x ln y = (N-1) ln N - N ln(N-1) = N ln N - ln N - N ln(N-1) = N [ln N - ln(N-1)] - ln N = N ln(1 + 1/(N-1)) - ln N. N ln(1+1/(N-1)) ≈ N/(N-1) - N/(2 (N-1)^2) + ... ≈ 1 + 1/(N-1) - ... So diff ≈ 1 + 1/(N-1) - ln N. For N=1e9, diff ≈ 1 - 20.7 = -19.7, so magnitude about 19.7. So fine.

    Thus tolerance is not needed. However, we can still use a small epsilon like 1e-12 to guard against any weird case. It doesn't hurt.

    Thus solution is straightforward.

    But wait: There is a nuance: When x or y are 0? Not allowed. So fine.

    I'll produce final code.

    Time complexity: O(1) constant.

    Now, but I should also consider the possibility of using integer arithmetic: compare x^y and y^x by comparing ylog(x) and xlog(y) can be done using high precision integer with logarithms in rational approximations? Not needed.

    Thus answer: implement as described.

    Edge cases: x=1,y=2 -> 1^2=1, 2^1=2 => 1<2 -> '<'. Good.

    x=2,y=1 -> '>'.

    x=2,y=4 -> '='.

    x=4,y=2 -> '='.

    x=3,y=3 -> '='.

    Now test with given examples:

    5 8: 5^8 > 8^5? Actually 5^8=390625, 8^5=32768 -> '>'. Our code: x=5,y=8, not special, compute a = 8ln5=81.60944=12.8755, b=5ln8=52.07944=10.3972, a > b => '>'.

    10 3: a = 3ln10=32.30259=6.9078, b=10ln3=101.0986=10.986, a<b => '<'.

    6 6: x==y => '='.

    All good.

    Now produce final answer: Write program.

    But we need to output exactly '<', '>', or '='.

    Implementation in Python:

    def solve(): import sys, math x_str = sys.stdin.read().strip().split() if not x_str: return x, y = map(int, x_str) if x == y: print('=') return if x == 1: print('<') return if y == 1: print('>') return if (x == 2 and y == 4) or (x == 4 and y == 2): print('=') return a = y * math.log(x) b = x * math.log(y) if a < b: print('<') elif a > b: print('>') else: print('=')

    This should be correct.

    But wait: Could there be an issue with integer overflow when computing y * math.log(x)? No, it's float.

    We might also consider the case where x and y are large and the logs are computed with slight error. But it's fine.

    Alternatively, we can use the property that for both > e (i.e., >=3), we can compare x and y: if x<y then x^y > y^x? Let's check: For t>e, f decreasing, so larger t gives smaller f. So if x<y then f(x) > f(y) (since x smaller) => x^{1/x} > y^{1/y} => x^y > y^x? Let's derive: f(x) > f(y) means ln x / x > ln y / y => y ln x > x ln y => x^y > y^x. So yes, for x,y >=3, if x < y then x^y > y^x; if x > y then x^y < y^x. But careful: Is it strictly decreasing for all t>e? Yes. So if both x,y >=3, we can compare directly: if x < y then output '>'; if x > y then '<'. But is that always true? Let's test: x=3,y=4: 3<4, 3^4=81, 4^3=64 => 81>64 => '>'. Good. x=3,y=5: 3^5=243,5^3=125 => >. x=4,y=5: 4^5=1024,5^4=625 => >. So yes. For both >=3, larger exponent base leads to smaller? Actually the pattern: If both > e, then the smaller base raised to the larger exponent is larger. Interesting.

    Now for cases where one is 2: Since 2 < e, f(2) is less than f(3)? Actually f(2) ~0.3466, f(3)~0.3662, so f(2) < f(3). And f(4) = f(2). For x=2, y=3: f(2) < f(3) => 2^3 < 3^2. So if one is 2 and other is >=3, we cannot simply use the direct comparison because f(2) is not always less than f(y) for y>3? Actually f(2)=ln2/2≈0.3466; f(3)=0.3662; f(4)=0.3466; f(5)=0.3219; f(6)=ln6/6≈1.7918/6=0.2986; So f(2) > f(5)? Actually 0.3466 > 0.3219, so for y=5, f(2) > f(5) => 2^5 > 5^2? 2^5=32, 5^2=25 => yes, >. For y=6: 2^6=64,6^2=36 => >. So for y>=5, 2^y > y^2. For y=3: 2^3=8 < 9 => <. For y=4: equal. So special handling needed for 2 and 4. So we can incorporate these into a case-based approach to avoid logs entirely.

    Let's explore case-based logic:

    Given x, y >=1.

    If x==y: '='.

    Else if x==1: 1^y=1, y^1=y => '<'.

    Else if y==1: '>'.

    Else if x==2 and y==4: '='.

    Else if x==4 and y==2: '='.

    Else if x==2 and y==3: '<'.

    Else if x==3 and y==2: '>'.

    Else if x==2 and y>=5: then 2^y > y^2? Actually we need to compare: 2^y vs y^2. For y>4, it's >. So if x==2 and y>4: then '>'. Wait: check direction: x=2, y>4 => x^y > y^x? 2^y > y^2 => '>'. So for x=2, y>4 => '>'. For x=2, y=3 => '<'. For x=2, y=4 => '=' (handled). For x=2, y=2 already equal. For x=2, y=1 handled.

    Similarly, if y==2 and x>4: then x^2 vs 2^x. For x>4, 2^x > x^2? Actually compare 2^x and x^2. For x=5: 2^5=32, 5^2=25 => 2^5 > 5^2, so x^2 < 2^x => x^2 < 2^x => but we are comparing x^y = x^2 with y^x = 2^x. So if x^2 < 2^x => '<'? Actually x=5, y=2: 5^2=25, 2^5=32 => 25<32 => '<'. But if x=3,y=2: 3^2=9, 2^3=8 => 9>8 => '>'. So for y=2 and x>4, we have x^2 < 2^x => '<'. For x=3: '>', x=4: '=' (handled). So we can incorporate these.

    Now for remaining cases, if both x and y >=3. But need to consider if one is 2 or 3 etc. We already handled all with 1,2,3,4? Let's list all possibilities for small numbers:

    We need to compare x^y and y^x.

    Case both >=3 and not (x=3,y=2 or 2,3) etc. Actually if both >=3, we can use rule: if x<y then '>', else '<'. But we must ensure this holds for (3,4) etc. It does. But does it hold for (3,5)? Yes. (3,6)? 3^6=729,6^3=216 => >. (4,5): 4^5=1024,5^4=625 => >. (4,6): 4^6=4096,6^4=1296 => >. (5,6): 5^6=15625,6^5=7776 => >. So seems correct.

    But need to consider if x=3,y=3: equal handled. So for both >=3 and x != y, the rule is consistent: smaller base yields larger result.

    But we must be careful: Does the function f(t) = ln t / t strictly decrease for t >= 3? At t=3, f'(3) = (1 - ln3)/9 ≈ (1-1.0986)/9 negative, yes. So for all t>=3, f is strictly decreasing (since ln t > 1 for t>e). Actually f' negative when ln t > 1 => t > e. Since e≈2.718, t>=3 > e, so strictly decreasing. So yes.

    Thus for both x,y >=3, we can compare directly without logs.

    Now, we still have to handle the cases where one is 2 and the other is >=5? Actually we already covered many.

    But we can also handle all remaining cases with logs; that's simpler. However, case-based approach might be slightly faster and avoid floating point entirely. But given it's simple, we might just use logs and avoid many conditionals.

    But note: The problem may be from Codeforces, and typical solution uses logs with long double. However, some languages like Python may have slight inaccuracies? But we argued it's safe.

    Nevertheless, we can implement either. I'll write a solution using logs with a small epsilon, plus special cases for equality.

    But I recall that in Python, math.log for large integers is accurate enough. So I'll provide that.

    However, one more nuance: In Python, integers have arbitrary precision, but floating point is double. When computing y * math.log(x), the product is a float. Might there be a case where the difference is exactly 0 due to rounding? Possibly only for equal numbers which we handle. But also for (2,4) we handle. So else we can just compare.

    Thus final solution.

    We can also use the built-in math.log2 and multiply by something, but it's fine.

    I'll produce final code.

    But wait: Are there any cases where x^y and y^x are equal for distinct integers other than (2,4)? I should verify with small numbers: (2,4) works. (1, anything) not. (3, something) check f(3)= ln3/3≈0.3662; f( something ) same? Solve ln t / t = 0.3662 => t? f(2)=0.3466, f(3)=0.3662, f(4)=0.3466, f(5)=0.3219; so only 2 and 4 share same value. So that's it.

    Thus code.

    Now, let's produce final answer: In the explanation, we might describe the solution using logarithms and special cases.

    We'll write solution in Python 3.

    Make sure to import math.

    I'll also consider using sys.stdin.readline.

    Now produce final answer. ```python import sys import math

    def solve() -> None: data = sys.stdin.read().strip().split() if not data: return x, y = map(int, data)

    # obvious equality
    if x == y:
        print('=')
        return
    
    # handle 1 separately (1^a = 1, a^1 = a)
    if x == 1:
        print('<')
        return
    if y == 1:
        print('>')
        return
    
    # known exact equalities for distinct numbers
    if (x == 2 and y == 4) or (x == 4 and y == 2):
        print('=')
        return
    
    # for all other cases, compare using logarithms
    # x^y < y^x  <=>  y * ln(x) < x * ln(y)
    left = y * math.log(x)
    right = x * math.log(y)
    
    if left < right:
        print('<')
    elif left > right:
        print('>')
    else:
        # theoretically unreachable because all equalities were caught,
        # but kept for safety.
        print('=')
    

    if name == "main": solve()