Prove that $\omega$ is closed if $\int_{c}\omega \in \mathbb{Q}$.

Let $$\omega$$ be a differentiable 1-from defined on an open subset $$U \subset \mathbb{R}^{n}$$. Suppose that for each closed differential curve $$c$$ in $$U$$, $$\int_{c}\omega \in \mathbb{Q}$$. Prove that $$\omega$$ is closed.

I tried some approaches but they didn’t work.

2. I can prove the statement and I can conclude that the integral (as a continuous function) is constant. So, $$f(t) = \int_{c(t)}\omega = \frac{p}{q}$$ for each $$t$$. Thus, can I conclude that $$d\omega = f”(t) = 0$$?