#Matlab, <strike>96</strike> 81 bytes Golfed (-15bytes), props to [Luis Mendo] [1] function w(n);a=find(~(mod(n,1:n)));[~,c]=min(abs(a./(n./a)-1.618));[a(c) n/a(c)] Original: function w(n) a=find(not(mod(n,1:n)));b=abs(a./(n./a)-1.618);c=find(not(b-min(b)));[a(c) n/a(c)] This is by far not a great solution, but my first attempt at code-golf. What fun! [1]: https://codegolf.stackexchange.com/users/36398/luis-mendo