The two nucleic acids are DNA(deoxyribonucleic acid) and RNA (ribonucleic acid). These are complex, high-molecular-weight nucleotide chains that convey genetic information. They convey this genetic material by coding for different proteins. Proteins are made in the cytoplasm of cells in a process called translation.
So the relationship between the two is that nucleic acids code for proteins via trancription and translation.