All estates at will or by sufferance may be terminated by either party, by three months' notice in writing given by the other party. When the rent received in a lease at will is payable at periods of less than three months the time of such notice shall be sufficient if it is equal to the interval between the times of payment. In all cases of neglect or refusal to pay the rent due on a lease at will, fourteen days' notice to quit, given in writing by the landlord to the tenant, shall be sufficient to terminate the lease.