1. while 1:
  2. try:
    
  3.     n=input()
    
  4. except:
    
  5.     break
    
  6. tx,ty=[],[]
    
  7. for i in range(int(n)):
    
  8.     x,y=map(int,input().split())
    
  9.     tx.append(x)
    
  10.     ty.append(y)
    
  11. mx=max(max(tx)-min(tx),max(ty)-min(ty))**2
    
  12. print(mx)