How find this minimum of the value of $n$( 2013 china Mathematical olympiad simulation test ) 
Let $S=\{1,2,3,\cdots,n\}$. Find the minimum of positive integer $n$, such that for any partition of $S$ into $A$ and $B$, 
  $$A\cap B =\emptyset,A\cup B=S$$
  then at least one of the subsets $A$ or $B$ must have two different elements $a,b$, such that
  $$a+b\mid ab$$

and  This problem is from this

I have consider sometimes,and this problem don't have solution,I hope someone can help,Thank you
my try: 
let Gcd$(a,b)=d$,then 
$$a=a_{1}d,b=b_{1},gcd(a_{1},a_{2})=1$$
since

$$(a+b)|ab$$
  then we have
  $$(a_{1}+b_{1})|(a_{1}b_{1}d)$$
  since
  $$(a_{1}+b_{1},a_{1})=(a_{1}+b_{1},b_{1})=(a_{1},b_{1})=1$$
  so
  $$(a+b)|ab\Longleftrightarrow (a_{1}+b_{1})|d$$

so let $d=k(a_{1}+b_{1})$.
so
$$a=ka_{1}(a_{1}+b_{1}),b=kb_{1}(a_{1}+b_{1})$$
Then I can't,Thank you for you can help.Thank you very much.
and I have found there is same problem; there is China National Olympiad 1996 problem 2: can see this： http://www.artofproblemsolving.com/Forum/viewtopic.php?p=1507766&sid=e25e6454134749f7426ce808796903b4#p1507766
 A: Begin from your characterisation, $$a=ka_1(a_1+b_1), b=kb_1(a_1+b_1)$$
First observe that if $n$ satisfies the given property, so does  any $m \geq n$.
It turns out (after some trial and error) that $n=40$ is minimal. It then suffices to show that $n=40$ works, and $n=39$ does not.
We thus only concern ourselves with $a, b \leq 40$. We may WLOG assume $a<b$, so $a_1<b_1$. Note that we want $40 \geq b=kb_1(a_1+b_1) \geq (1)(b_1)(1+b_1)$ so $b_1 \leq 5$.
$a_1=1, b_1=2: (3, 6), (6, 12), (9, 18), (12, 24), (15, 30), (18, 36)$
$a_1=1, b_1=3: (4, 12), (8, 24), (12, 36)$
$a_1=2, b_1=3:(10, 15), (20, 30)$
$a_1=1, b_1=4: (5, 20), (10, 40)$
$a_1=3, b_1=4: (21, 28)$
$a_1=1, b_1=5: (6, 30)$
$a_1=2, b_1=5: (14, 35)$
$a_1=3, b_1=5: (24, 40)$
Consider $n \geq 40$, and assume on the contrary that there is a partition of $S$ into $A, B$ such that neither $A$ nor $B$ have two elements $a, b$ s.t. $a+b|ab$. Then WLOG assume $3 \in A$. Thus 
$$3 \in A \Rightarrow 6 \in B \Rightarrow 12 \in A \Rightarrow 24 \in B \Rightarrow 40 \in A \Rightarrow 10 \in B \Rightarrow 15 \in A \Rightarrow 30 \in B \Rightarrow 6 \in A$$
We thus get a contradiction.
Therefore $n=40$ has the desired property.
Finally $n=39$ fails by the following partition: 
$$A=\{4, 6, 9, 15, 20, 24, 28, 35, 36\}, B=S\setminus A=\{1, 2, \ldots , 39\} \setminus A$$
Thus $n=40$ is minimal.
