/*=================================*\
| |
| Md. Shahidul Islam |
| CSE, BRUR |
| Rangpur, Bangladesh |
| mail: shahidul.cse.brur@gmail.com |
| FB : fb.com/shahidul.brur |
| Blog: shahidul-brur.blogspot.com |
\*=================================*/
#include<bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define pii pair<int, int>
#define vii vector<pair<int, int> >
#define vs vector<string>
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define sz size()
#define all(a) a.begin(), a.end()
#define F(i, a, b) for(int i=a;i<=b;i++)
#define rep(i, k) for(int i=0;i<k;i++)
#define rep1(i, k) for(int i=1;i<=k;i++)
#define FORR(i, b, a) for(int i=b;i>=a;i--)
#define FOR(i, a, b) for(int i=a;i<=b;i++)
#define pi acos(-1.0)
#define eps 1e-6
#define mem(a, b) memset(a, b, sizeof(a))
#define ll long long
#define ull unsinged long long
#define mod 1000000007
#define N 1000005
#define inf 1e9
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
//ios_base::sync_with_stdio(false); cin.tie(NULL);
int m=0, mini, n, a[105], pos;
cin>>n;
rep(i, n)
{
cin>>a[i];
}
sort(a, a+n);
mini = a[0];
rep(i, n)
if(a[i]==mini)
m++;
else break;
if(m>1)
cout << a[0] << " " << n << "\n";
else
{
if(n==1)
cout << a[0]*2 << " " << " 1" << "\n";
else
cout << min(a[0]*2, a[m]) << " 1\n";
}
return 0;
}
Lyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qXAp8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CnwgICAgICBNZC4gU2hhaGlkdWwgSXNsYW0gICAgICAgICAgIHwKfCAgICAgICAgIENTRSwgQlJVUiAgICAgICAgICAgICAgICAgfAp8ICAgICAgUmFuZ3B1ciwgQmFuZ2xhZGVzaCAgICAgICAgICB8CnwgbWFpbDogc2hhaGlkdWwuY3NlLmJydXJAZ21haWwuY29tIHwKfCBGQiAgOiBmYi5jb20vc2hhaGlkdWwuYnJ1ciAgICAgICAgfAp8IEJsb2c6IHNoYWhpZHVsLWJydXIuYmxvZ3Nwb3QuY29tICB8ClwqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KI2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCiNkZWZpbmUgdmkgICAgICAgdmVjdG9yPGludD4KI2RlZmluZSBwaWkgICAgICBwYWlyPGludCwgaW50PgojZGVmaW5lIHZpaSAgICAgIHZlY3RvcjxwYWlyPGludCwgaW50PiA+CiNkZWZpbmUgdnMgICAgICAgdmVjdG9yPHN0cmluZz4KCiNkZWZpbmUgcGIgICAgICAgICAgICAgIHB1c2hfYmFjawojZGVmaW5lIG1wICAgICAgICAgICAgICBtYWtlX3BhaXIKI2RlZmluZSBmZiAgICAgICAgICAgICAgZmlyc3QKI2RlZmluZSBzcyAgICAgICAgICAgICAgc2Vjb25kCiNkZWZpbmUgc3ogICAgICAgICAgICAgIHNpemUoKQojZGVmaW5lIGFsbChhKSAgICAgICAgICBhLmJlZ2luKCksIGEuZW5kKCkKI2RlZmluZSBGKGksIGEsIGIpICAgICAgZm9yKGludCBpPWE7aTw9YjtpKyspCiNkZWZpbmUgcmVwKGksIGspICAgICAgIGZvcihpbnQgaT0wO2k8aztpKyspCiNkZWZpbmUgcmVwMShpLCBrKSAgICAgIGZvcihpbnQgaT0xO2k8PWs7aSsrKQojZGVmaW5lIEZPUlIoaSwgYiwgYSkgICBmb3IoaW50IGk9YjtpPj1hO2ktLSkKI2RlZmluZSBGT1IoaSwgYSwgYikgICAgZm9yKGludCBpPWE7aTw9YjtpKyspCiNkZWZpbmUgcGkgICAgICAgICAgICAgIGFjb3MoLTEuMCkKI2RlZmluZSBlcHMgICAgICAgICAgICAgMWUtNgojZGVmaW5lIG1lbShhLCBiKSAgICAgICBtZW1zZXQoYSwgYiwgc2l6ZW9mKGEpKQojZGVmaW5lIGxsICAgICAgICAgICAgICBsb25nIGxvbmcKI2RlZmluZSB1bGwgICAgICAgICAgICAgdW5zaW5nZWQgbG9uZyBsb25nCiNkZWZpbmUgbW9kICAgICAgICAgICAgIDEwMDAwMDAwMDcKI2RlZmluZSBOICAgICAgICAgICAgICAgMTAwMDAwNQojZGVmaW5lIGluZiAgICAgICAgICAgICAxZTkKCmludCBtYWluKCkKewogICAgLy9mcmVvcGVuKCJpbi50eHQiLCAiciIsIHN0ZGluKTsKICAgIC8vZnJlb3Blbigib3V0LnR4dCIsICJ3Iiwgc3Rkb3V0KTsKICAgIC8vaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7IGNpbi50aWUoTlVMTCk7CiAgICBpbnQgbT0wLCBtaW5pLCBuLCBhWzEwNV0sIHBvczsKICAgIGNpbj4+bjsKICAgIHJlcChpLCBuKQogICAgewogICAgICAgIGNpbj4+YVtpXTsKICAgICAgICAKICAgIH0KICAgIHNvcnQoYSwgYStuKTsKICAgIG1pbmkgPSBhWzBdOwogICAgcmVwKGksIG4pCiAgICAgICAgaWYoYVtpXT09bWluaSkKICAgICAgICAgICAgbSsrOwogICAgICAgIGVsc2UgYnJlYWs7CiAgICBpZihtPjEpCiAgICAgICAgY291dCA8PCBhWzBdIDw8ICIgIiA8PCBuIDw8ICJcbiI7CiAgICBlbHNlIAogICAgewogICAgICAgIGlmKG49PTEpCiAgICAgICAgICAgIGNvdXQgPDwgYVswXSoyIDw8ICIgIiA8PCAiIDEiIDw8ICJcbiI7CiAgICAgICBlbHNlCiAgICAgICAgICBjb3V0IDw8IG1pbihhWzBdKjIsIGFbbV0pIDw8ICIgMVxuIjsKICAgICB9CiAgICByZXR1cm4gMDsKfQoK