Elementary number theory books often give as an example of non-unique factorization the set $S = \{4k+1: k \in \mathbb{N}\}$. $S$ doesn't have unique factorization because $(3 \cdot{7})(11 \cdot {19}) = (3 \cdot{11})(7 \cdot{19})$ expresses $4389$ as the product of irreducibles (in $S$) in two different ways.
The set $S$ is a multiplicative set (which I'll define shortly). My question is whether or not there is a necessary and sufficient condition for a multiplicative subset of the natural numbers to have unique factorization.
Define a subset of the natural numbers to be multiplicative if
(1) $1\in S$, and
(2) If $x \text{ and } y \in S, \text{ then } x \cdot{y} \in S$.
In the following, I'll use the word "prime" to mean one of the usual prime numbers. I'll use "irreducible" to refer to an element of a specific multiplicative subset of $\mathbb{N}$ that cannot be written as the product of two smaller elements of the set. A multiplicative subset of $\mathbb{N}$ will be said to have unique factorization if all of the elements of the set (other than 1) can be written as the product of irreducible elements in an essentially unique way (all irreducibles appear in the product the same number of times, possibly in a different order). Otherwise, the set will be said to have non-unique factorization.
Multiplicative subsets of $\mathbb{N}$ other than the set $S$ defined above may not have unique factorization. For example, let $T = \{n \in \mathbb{N} : n \text{ is composite}\}$. Then $4$, $6$ and $9$ are all irreducible in $T$ (since they can't be written as a product of composites). However, $4 \cdot{9} = 6 \cdot{6}$, expresses $36$ as the product of irreducibles in two different ways.
Another such example is the set $\{1, 2^2, 2^3, 2^4, 2^5, \dots\}$. In this multiplicative set, $2^2 \text{ and }2^3$ are irreducibles, but $2^2 \cdot{2^2} \cdot{2^2} = 2^3 \cdot{2^3}$ expresses $64$ as the product of irreducibles in two different ways.
On the other hand, there are plenty of multiplicative subsets of $\mathbb{N}$ that do have unique factorization. For example, if $\mathcal{P}$ is any set of prime numbers (finite or infinite), then the multiplicative set generated by all products of elements from $\mathcal{P}$ has unique factorization. Another example is $\{n \in \mathbb{N}: n \text{ can be written as the sum of two squares of positive integers}\}$. This set is multiplicative by the identity $(n^2+m^2)(u^2+v^2) = (nu+mv)^2+ (nv-mu)^2$, Its irreducibles are $\{2\}$ $\cup$ $\{p: p\equiv 1 \pmod4\}$ $\cup$ $\{q^2: q\equiv 3 \pmod4\}$. I can show that this multiplicative set has unique factorization (in short, the result follows from unique factorization in $\mathbb{N}$ and since no irreducible contains two different prime factors).
I realize that these multiplicative sets are monoids and that there are extensive results about factorization in monoids. However, I searched the Internet for results about my question and couldn't find anything. So, the questions stands: Are there any necessary and sufficient conditions for a multiplicative subset of $\mathbb{N}$ to have unique (or non-unique) factorization. Thanks in advance for any advice. Please let me know if I need to clarify any of the above. (Apologies in advance if my { and } in set definitions aren't rendering in Mathjax. I escaped the characters with a \ sign, but they aren't appearing correctly in preview.)