Codeforces ~ 1088A ~ Ehab and another construction problem (暴力)

Codeforces ~ 1088A ~ Ehab and another construction problem (暴力)

题意

给你一个x,让你求得一组a和b,满足ab>x,a/b<x,a%b=0a*b>x,a/b<x,a\%b=0,输出一组合法的a和b,如果没有输出-1.

思路

n2n^2暴力,或者O(1)。输出n-n%2和2.

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int x; scanf("%d", &x);
    if (x == 1) printf("-1\n");
    else printf("%d %d\n", x - x % 2, 2);
    return 0;
}
/*
10
*/