import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner cin=new Scanner(System.in);
BigInteger a,b;
while(cin.hasNext())//等效于输入到文件尾
{
a=cin.nextBigInteger();
b=cin.nextBigInteger();
System.out.println(a.add(b));//输出a+b
System.out.println(a.subtract(b));//输出a-b
System.out.println(a.multiply(b));//输出a*b
System.out.println(a.divide(b));//输出a/b
System.out.println(a.remainder(b));//输出a%b
if(a.compareTo(b)==0)System.out.println("a==b");
if(a.compareTo(b)>0)System.out.println("a>b");
if(a.compareTo(b)<0)System.out.println("a<b");
System.out.println(a.abs());//大数a的绝对值
int exponent=cin.nextInt();
System.out.println(a.pow(exponent)); //大整数a的exponent次幂
//返回大整数十进制的字符串表示
System.out.println(a.toString());
//返回大整数p进制的字符串表示
int p=cin.nextInt();
System.out.println(a.toString(p));
}
}
}