CF484B Maximum Value

Description

You are given a sequence $ a $ consisting of $ n $ integers. Find the maximum possible value of ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF484B/f78b808248b814b54b378a7e1094ac9b8497b197.png) (integer remainder of $ a_{i} $ divided by $ a_{j} $ ), where $ 1

Input Format

You are given a sequence $ a $ consisting of $ n $ integers. Find the maximum possible value of ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF484B/f78b808248b814b54b378a7e1094ac9b8497b197.png) (integer remainder of $ a_{i} $ divided by $ a_{j} $ ), where $ 1

Output Format

Print the answer to the problem.