Yun Yue Chen, 18, left, is the Class of 2014 valedictorian at Naugatuck High School. He will be attending Dartmouth along with his twin brother, Yun Chao Chen, who finished second in the class. –RA ARCHIVE

NAUGATUCK — The competition started on the first day of freshman year at Naugatuck High School.

Well, it probably started long before then, but high school is where it became more intense. There was something valuable on the line: the chance to rise to the head of the class.

Yun Yue Chen and Yun Chao Chen, 18-year-old twins and soon-to-be Naugatuck High School graduates, studied diligently for every quiz, every test and every final exam to earn the top grade. Each knew if he slipped up just slightly, the other could slip past him.

“I’d give a test and one would get a 97 and the other would get a 96, or maybe 100 and 99,” said teacher Traci Healy, who had the Chen twins for advanced placement calculus this year. “Then on the next test, it was vice-versa.”

The end result was Yun Yue surpassed his brother by the slightest of margins — at last count, his grade point average was 4.65 while Yun Chao’s GPA was 4.649. Suffice it to say, Yun Yue will graduate as the valedictorian of the NHS Class of 2014, while Yun Chao will finish as the salutatorian, or number two. They will both address the class at graduation Tuesday night at the Palace Theater in Waterbury.

The twins moved to the United States from southeast China about 11 years ago. Their parents, father Xiang Zhou Chen and mother Xue Zhen Tang, instilled in them the value of hard work, as they spent 70-plus hours a week at the restaurant they owned, Peking Tokyo in Mountview Plaza on Rubber Avenue.

From a young age, the boys were expected to help out in any way they could: they bused tables, took payments, cleaned floors and dishes — whatever needed to be done.

“We learned to work extremely hard every single day, and that you achieve success through hard work rather than luck,” Yun Chao said.

At the restaurant, they also learned to work together, which translated into the classroom and athletics — both played tennis and were on the swim team. Although they were and remain competitors, they also support each other, lending a hand for anything the other needs, including academic support. They both set out with a goal of being number one in the class, but they wanted it nearly as badly for each other as they did for themselves.

“We don’t like to lose to each other, so I think that competition drove us to succeed on tests, in sports and other things that we did,” Yun Yue said. “But not everything we do is a competition; we help each other out quite a bit. … We always have each other’s back.”

The competition and the helping doesn’t stop here: The Chen twins will head off to the Ivy League together. They will attend Dartmouth College in New Hampshire in the fall.

Yun Yue will study biology/pre-med with a focus on becoming a doctor, while Yun Chen will study biomedical engineering or medicine and may strive to be a doctor or a medical researcher.

Both said they are not married to their majors and would switch paths if something else intrigues them. But they know they want to use their intelligence to help others.

Though they may not room together next year — neither requested to live with the other because they want new experiences — they will continue to have each other’s back.

They want to be the first in their families to obtain a four-year college degree. Will they succeed? Most definitely, Healy said.

“They are among the most diligent and hardest workers I’ve seen,” she said. “They are wonderful young men and students.”