fork download
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main(){
  4. int n;
  5. scanf("%d",&n);
  6. n--;
  7. int k=sqrt(n)+0.1;
  8. while(n%k!=0){
  9. k--;
  10. }
  11. printf("%d %d",k,n/k);
  12. return 0;
  13. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
129 254