You are given three strings A, B and C. Check whether they form a word chain.

More formally, determine whether both of the following are true:

* The last character in A and the initial character in B are the same.
* The last character in B and the initial character in C are the same.



If both are true, print `YES`. Otherwise, print `NO`.

Constraints

* A, B and C are all composed of lowercase English letters (`a` - `z`).
* 1 ≤ |A|, |B|, |C| ≤ 10, where |A|, |B| and |C| are the lengths of A, B and C, respectively.

Input

Input is given from Standard Input in the following format:


A B C


Output

Print `YES` or `NO`.

Examples

Input

rng gorilla apple


Output

YES


Input

yakiniku unagi sushi


Output

NO


Input

a a a


Output

YES


Input

aaaaaaaaab aaaaaaaaaa aaaaaaaaab


Output

NO
Last login: Sun Apr 23 19:04:05 on ttys002
tMBP-de-Teche:~$ brew update
Updated 6 taps (caskroom/cask, caskroom/versions, homebrew/core, homebrew/dupes, homebrew/php, homebrew/versions).
==> New Formulae
adr-tools                                homebrew/php/phpspec
afuse                                    httpflow
alexjs                                   ifuse
ansible-lint                             immortal
apple-gcc42                              jing-trang
archivemount                             jvm-mon
avfs                                     krb5
awk                                      lapack
bandcamp-dl                              less
bc                                       libedit
binaryen                                 libetpan
bindfs                                   libiconv
btfs                                     libpcap
bzip2                                    lsof
c14-cli                                  m4
ck                                       make
cmark-gfm                                maven@3.3
conjure-up                               mp3fs
corebird                                 nano
curlftpfs                                ncompress
diffstat                                 ncurses
diffutils                                nicotine-plus
djmount                                  nnn
docker-machine-driver-vultr              ntfs-3g
ed                                       ntp
encfs                                    openldap
exa                                      openssh
expect                                   ori
ext2fuse                                 osmium-tool
ext4fuse                                 passwdqc
file-formula                             qcli
firebase-cli                             qmmp
flif                                     rex
flint-checker                            rofs-filtered
fstrm                                    rsync
fuse-zip                                 s3-backer
gcc@6                                    s3fs
gcsfuse                                  screen
gitfs                                    securefs
gitter-cli                               shfmt
gnupg@1.4                                simple-mtpfs
gnupg@2.0                                sshconfigfs
goad                                     sshfs
goofys                                   svgo
gpatch                                   tcl-tk
gperf                                    tcpdump
grep                                     terraform-docs
groff                                    tup
guile@2.0                                unzip
gzip                                     wabt
heimdal                                  wdfs
historian                                whois
homebrew/php/litmus-cli                  write-good
homebrew/php/phan@0.8                    xmlsectool
homebrew/php/php70-http                  xmount
homebrew/php/php70-propro                zlib
homebrew/php/php70-raphf                 zyre
homebrew/php/php71-phalcon
==> Updated Formulae
ace                                      kube-aws
afl-fuzz                                 kubernetes-cli
aha                                      kubernetes-helm
amazon-ecs-cli                           kvazaar
ammonite-repl                            latex2html
amqp-cpp                                 latex2rtf
ansible                                  lcdf-typetools
ansifilter                               ldc
antigen                                  lean-cli
apache-archiva                           ledger
apache-geode                             lft
apache-spark                             libbtbb
apache-zeppelin                          libcds
app-engine-java                          libcouchbase
appscale-tools                           libcroco
aptly                                    libdc1394
aptly-completion                         libepoxy
arangodb                                 libgeotiff
archi-steam-farm                         libglade
argus                                    libglademm
arm                                      libgnomecanvas
armor                                    libgnomecanvasmm
artifactory                              libgosu
asciinema                                libgphoto2
aspectj                                  libhttpseverywhere
astyle                                   liblastfm
ats2-postiats                            liblcf
audiofile                                liblinear
augeas                                   libmicrohttpd
aws-elasticbeanstalk                     libming
aws-sdk-cpp                              libmpc
awscli                                   libmtp
awslogs                                  libosmium
azure-cli                                libphonenumber
babel                                    libquicktime
basex                                    librdkafka
batik                                    libressl
bazel@0.2                                librsvg
bear                                     libsass
bgpdump                                  libsecret
bind                                     libsndfile
binwalk                                  libsoup
biogeme                                  libssh
bit                                      libtensorflow
bitrise                                  libtiff ✔
bluepill                                 libtins
bmake                                    libtorrent-rasterbar
bochs                                    libvirt
bonnie++                                 libvorbis
boom-completion                          libwebsockets
boost ✔                                  libxc
boost-bcp                                lilv
boost-mpi                                lldpd
boost-python                             llnode
botan                                    llvm
brotli                                   llvm@3.9
buildifier                               lnav
buku                                     log4cpp
bullet                                   logcheck
bup                                      logstash
byacc                                    logtalk
byobu                                    lrzip
byteman                                  luajit
caddy                                    lumo
cake                                     lv2
calabash                                 lxc
capnp                                    lynis
cargo-completion                         lysp
carthage                                 lzip
casperjs                                 macvim
catimg                                   mahout
cayley                                   mailhog
certbot                                  mame
cfr-decompiler                           mapserver
cgal                                     mariadb
cgdb                                     maven
chakra                                   media-info
chapel                                   mediaconch
cheapglk                                 menhir
checkstyle                               mercurial
chromedriver                             meson
cimg                                     metabase
clipper                                  metaproxy
clipsafe                                 metricbeat
closure-compiler                         mg3a
clutter-gst                              mikutter
cmake                                    miller
cockatrice                               mingw-w64
cocoapods                                minio
codec2                                   minio-mc
codequery                                mitmproxy
coffeescript                             mkdocs
collector-sidecar                        mksh
color-code                               mkvtoolnix
conan                                    mobile-shell
consul                                   modd
consul-template                          monetdb
convox                                   mongo-c-driver
corsixth                                 mongodb ✔
cpanminus                                monit
cppcheck                                 mono
cppunit                                  moreutils
creduce                                  mozjpeg
cromwell                                 mpdas
crystal-lang                             mpich
cucumber-cpp                             mps-youtube
curl                                     mpv
cweb                                     mu
dar                                      mupdf
datetime-fortran                         mupdf-tools
dbhash                                   mutt
dbt                                      mvtools
dbus                                     mycli
dbus-glib                                mysql ✔
deis                                     mysql++
derby                                    mysql-cluster
dfc                                      mysql-connector-c
dhall-json                               mysql-sandbox
di                                       mysql@5.5
dialog                                   mysql@5.6 ✔
diffoscope                               nagios
digdag                                   nagios-plugins
dirmngr                                  nasm
django-completion                        nativefier
djview4                                  nats-streaming-server
dmd                                      ncmpcpp
dnscrypt-proxy                           ne
dnsperf                                  neatvi
docker                                   neo4j
docker-completion                        neofetch
docker-compose                           netpbm
docker-compose-completion                nghttp2
docker-machine                           nginx
docker-machine-completion                node ✔
docker-machine-driver-xhyve              node-build
docker-machine-parallels                 node@4
dovecot                                  node@6
dspdfviewer                              nodebrew
dub                                      nomad
duck                                     notmuch
dungeon                                  npth
dvm                                      nq
e2fsprogs                                nsd
easyrpg-player                           nss
efl                                      nu
ejabberd                                 nudoku
elasticsearch                            nuxeo
elasticsearch@2.4                        nvc
elm-format                               nvm
emacs                                    nzbget
emscripten                               oauth2_proxy
etcd                                     ocaml
exiftool                                 ocamlbuild
fabio                                    ocamlsdl
fabric                                   ocproxy
fdroidserver                             ocrad
feedgnuplot                              offlineimap
ffmpeg                                   ola
file-roller                              oniguruma
filebeat                                 ooniprobe
fio                                      open-mpi
fits                                     open-mpi@1.6
flashrom                                 open-scene-graph
flow                                     opencoarrays
fluent-bit                               openjpeg
flyway                                   openmotif
folly                                    openrct2
fonttools                                opensc
fossil                                   openshift-cli
fox                                      openttd
fping                                    ophcrack
fq                                       orientdb
freeling                                 osc
freetds                                  osh
frege                                    osm2pgsql
frege-repl                               osmfilter
fstar                                    osquery
fwup                                     osrm-backend
fzf                                      packer
fzy                                      packer-completion
g3log                                    packetbeat
galen                                    paket
gammaray                                 pango ✔
gammu                                    par2
gauge                                    parallel
gcc                                      pari
gdal                                     passenger
gdk-pixbuf                               passpie
gearboy                                  pdal
gearsystem                               pdf2htmlex
geckodriver                              pdftoedn
gecode                                   percona-server
generate-json-schema                     percona-toolkit
geographiclib                            pgplot
geoip                                    pick
getdns                                   pioneer
ghostscript                              pipes-sh
giflib                                   planck
git-cola                                 plantuml
git-extras                               platformio
git-fresh                                plustache
git-lfs                                  pmd
git-quick-stats                          pngquant
git-town                                 poco
gitbucket                                polyml
giter8                                   ponyc
github-release                           poppler
gitlab-ci-multi-runner                   postgrest
gjs                                      potrace
gjstest                                  ppsspp
glassfish                                pqiv
glbinding                                pre-commit
glibmm                                   prettyping
glm                                      primesieve
globjects                                proftpd
gmime                                    prometheus
gnome-builder                            proof-general
gnome-recipes                            protobuf
gnu-cobol                                protobuf-c
gnupg                                    protobuf-swift
gnupg-pkcs11-scd                         pure-ftpd
gnuradio                                 purescript
gnutls                                   pushpin
go                                       putty
gobject-introspection ✔                  pwntools
godep                                    pxz
goenv                                    pybind11
gollum                                   pyenv ✔
googler                                  pyexiv2
gor                                      pygobject3
gosu                                     pyinvoke
gotags                                   pypy
gpa                                      q
gpac                                     qbs
gpg-agent                                qca
gpgme                                    qcachegrind
gradle                                   qemu
grafana                                  qjackctl
grails                                   qjson
graphite2                                qscintilla2
grc                                      qtads
grib-api                                 quazip
groonga                                  quex
groovy                                   qwt
groovysdk                                qwtpolar
grpc                                     qxmpp
gspell                                   rabbitmq
gssh                                     ragel
gtef                                     rakudo-star
gtk-mac-integration                      rancher-cli
gtksourceview3                           re2
gtkspell3                                rebar@3
guile                                    rgbds
gwenhywfar                               riak
gwyddion                                 riemann
gxml                                     ripgrep
h2o                                      rlwrap
hadoop                                   rocksdb
handbrake                                rom-tools
haproxy                                  roswell
harfbuzz ✔                               rtags
hashcat                                  rtv
hebcal                                   ruby-build ✔
heroku                                   ruby@2.2
hg-fast-export                           ruby@2.3
hledger                                  rust
homebrew/php/adminer                     s-search
homebrew/php/deployer                    s6
homebrew/php/drush                       sbcl
homebrew/php/envoy                       sbt ✔
homebrew/php/igbinary                    scala ✔
homebrew/php/n98-magerun2                scalaenv
homebrew/php/pdepend                     schismtracker
homebrew/php/phan                        scipy
homebrew/php/php-cs-fixer                scw
homebrew/php/php53-http                  sdcv
homebrew/php/php53-igbinary              sdlpop
homebrew/php/php53-memcached             selenium-server-standalone
homebrew/php/php53-redis                 servus
homebrew/php/php53-timecop               sfk
homebrew/php/php53-timezonedb            sflowtool
homebrew/php/php54-couchbase             sha1dc
homebrew/php/php54-http                  shadowsocks-libev
homebrew/php/php54-igbinary              shyaml
homebrew/php/php54-memcached             sip
homebrew/php/php54-mongodb               sjk
homebrew/php/php54-redis                 skinny
homebrew/php/php54-timecop               slackcat
homebrew/php/php54-timezonedb            sleuthkit
homebrew/php/php55-couchbase             snappystream
homebrew/php/php55-http                  solarus
homebrew/php/php55-igbinary              solr
homebrew/php/php55-memcached             sonar-scanner
homebrew/php/php55-mongodb               sonarqube
homebrew/php/php55-phalcon               sops
homebrew/php/php55-redis                 source-highlight
homebrew/php/php55-timecop               sourcekitten
homebrew/php/php55-timezonedb            sourcery
homebrew/php/php55-xdebug                spdlog
homebrew/php/php56-couchbase             speedtest_cli
homebrew/php/php56-grpc                  sphinx-doc
homebrew/php/php56-http                  spiped
homebrew/php/php56-igbinary              sqldiff
homebrew/php/php56-memcached             sqlite
homebrew/php/php56-mongodb               sqlite-analyzer
homebrew/php/php56-phalcon               sqlmap
homebrew/php/php56-redis                 squid
homebrew/php/php56-timecop               sratom
homebrew/php/php56-timezonedb            ssh-copy-id
homebrew/php/php56-xdebug                sslscan
homebrew/php/php70                       sslyze
homebrew/php/php70-couchbase             stdman
homebrew/php/php70-gmp                   stern
homebrew/php/php70-grpc                  stk
homebrew/php/php70-igbinary              stone-soup
homebrew/php/php70-intl                  streamlink
homebrew/php/php70-mcrypt                strongswan
homebrew/php/php70-memcached             stunnel
homebrew/php/php70-mongodb               supersonic
homebrew/php/php70-opcache               swift
homebrew/php/php70-pcntl                 swiftformat
homebrew/php/php70-pdo-dblib             swiftlint
homebrew/php/php70-pdo-pgsql             sxiv
homebrew/php/php70-phalcon               sylpheed
homebrew/php/php70-pspell                syncthing
homebrew/php/php70-redis                 sysbench
homebrew/php/php70-snmp                  sysdig
homebrew/php/php70-swoole                szl
homebrew/php/php70-tidy                  tarsnap-gui
homebrew/php/php70-timecop               tcpreplay
homebrew/php/php70-timezonedb            tee-clc
homebrew/php/php70-xdebug                teleport
homebrew/php/php71                       tenyr
homebrew/php/php71-couchbase             terraform
homebrew/php/php71-gmp                   terragrunt
homebrew/php/php71-grpc                  tesseract ✔
homebrew/php/php71-igbinary              testssl
homebrew/php/php71-intl                  tfenv
homebrew/php/php71-mcrypt                tgui
homebrew/php/php71-memcached             the_silver_searcher
homebrew/php/php71-mongodb               thefuck
homebrew/php/php71-opcache               tile38
homebrew/php/php71-pcntl                 tippecanoe
homebrew/php/php71-pdo-dblib             tmux
homebrew/php/php71-pdo-pgsql             todolist
homebrew/php/php71-pspell                todoman
homebrew/php/php71-redis                 tomcat
homebrew/php/php71-snmp                  tomcat@7
homebrew/php/php71-swoole                tomcat@8.0
homebrew/php/php71-tidy                  tor
homebrew/php/php71-timecop               transcrypt
homebrew/php/php71-timezonedb            translate-shell
homebrew/php/php71-xdebug                treefrog
homebrew/php/phpcpd                      ttyd
homebrew/php/phpmyadmin                  twarc
homebrew/php/phpunit                     typescript
homebrew/php/phpunit@5.7                 ubertooth
homebrew/php/terminus                    uhd
honcho                                   unbound
httpie                                   unicorn
httrack                                  upscaledb
hugo                                     urh
hydra                                    urweb
hyper                                    uwsgi
icdiff                                   vagrant-completion
icoutils                                 vala
idris                                    valabind
imagemagick ✔                            vaulted
imagemagick@6                            vc4asm
imageworsener                            vice
imlib2                                   vim
infer                                    vnu
influxdb                                 vte3
influxdb@0.8                             wartremover
instead                                  watchexec
ipfs                                     webpack
iproute2mac                              weechat
iso-codes                                wesnoth
jbig2dec                                 widelands
jboss-forge                              wine
jenkins                                  winetricks
jenkins-lts                              wireguard-tools
jetty                                    wireshark
jetty-runner                             wolfssl
jfrog-cli-go                             x265
jhead                                    xdot
jmxtrans                                 xmake
json-fortran                             xplanet
jsonschema2pojo                          xsv
jumanpp                                  yadm
jump                                     yarn
kafkacat                                 yaz
kapacitor                                you-get
kawa                                     youtube-dl
khal                                     zabbix
kibana                                   zbackup
kitchen-sync                             zebra
knot                                     zimg
knot-resolver                            zinc
kobalt                                   zsh-completions
kompose                                  zstd
kotlin                                   zurl
==> Renamed Formulae
eris -> monax
grunt -> grunt-cli
ledger26 -> ledger@2.6
libpng12 -> libpng@1.2
libpqxx3 -> libpqxx@3
libxml278 -> libxml2@2.7
logstash24 -> logstash@2.4
mapnik2 -> mapnik@2
maven31 -> maven@3.1
maven32 -> maven@3.2
mongodb26 -> mongodb@2.6
mongodb30 -> mongodb@3.0
mongodb32 -> mongodb@3.2
pyqt5 -> pyqt
qt5 -> qt
selenium-server-standalone245 -> selenium-server-standalone@2.45
solr54 -> solr@5.4
solr55 -> solr@5.5
srtp15 -> srtp@1.5
subversion18 -> subversion@1.8
swig2 -> swig@2
swig304 -> swig@3.04
thrift090 -> thrift@0.90
unison240 -> unison@2.40
v8-315 -> v8@3.15
varnish4 -> varnish@4
vim74 -> vim@7.4
zeromq32 -> zeromq@3.2
zeromq40 -> zeromq@4.0
==> Deleted Formulae
fb-adb                                   homebrew/versions/imagemagick-ruby186
giflib@5                                 homebrew/versions/mono3
gnupg2                                   libgc
gnupg@2.1                                multirust
homebrew/dupes/srm
MBP-de-Teche:~$ go
-bash: go: command not found
MBP-de-Teche:~$ brew instal go
^C==> Downloading https://homebrew.bintray.com/bottles/go-1.8.1.el_capitan.bottle.
######################################################################## 100.0%
==> Pouring go-1.8.1.el_capitan.bottle.tar.gz
==> Caveats
A valid GOPATH is required to use the `go get` command.
If $GOPATH is not specified, $HOME/go will be used by default:
  https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH:
  export PATH=$PATH:/usr/local/opt/go/libexec/bin
==> Summary
🍺  /usr/local/Cellar/go/1.8.1: 7,030 files, 281.8MB
MBP-de-Teche:~$ go
Go is a tool for managing Go source code.

Usage:

	go command [arguments]

The commands are:

	build       compile packages and dependencies
	clean       remove object files
	doc         show documentation for package or symbol
	env         print Go environment information
	bug         start a bug report
	fix         run go tool fix on packages
	fmt         run gofmt on package sources
	generate    generate Go files by processing source
	get         download and install packages and dependencies
	install     compile and install packages and dependencies
	list        list packages
	run         compile and run Go program
	test        test packages
	tool        run specified go tool
	version     print Go version
	vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

	c           calling between Go and C
	buildmode   description of build modes
	filetype    file types
	gopath      GOPATH environment variable
	environment environment variables
	importpath  import path syntax
	packages    description of package lists
	testflag    description of testing flags
	testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

MBP-de-Teche:~$
MBP-de-Teche:~$ ls
Applications		Music			key
Desktop			OneDrive		macports
Documents		Pictures		projects
Downloads		Public			texput.log
Dropbox			VirtualBox VMs		unity
Envs			cloud_sql_proxy		vagrants
IdeaProjects		composer.phar		var
Library			git
Movies			google-cloud-sdk
MBP-de-Teche:~$ cd projects/
MBP-de-Teche:projects$ ls
advent		memo-app	profy		robitalk_	techcamp
flaskproj	mokumoku	questionnaire	slack_py
fronttest	node-todo	robitalk	sql_curriculum
MBP-de-Teche:projects$ cd mokumoku/
MBP-de-Teche:mokumoku$ l
-bash: l: command not found
MBP-de-Teche:mokumoku$ ls
20151127mokumoku.pptx		pypdftest.py
abst.txt			result.txt
abst.txt.txt			scikit-learn_tutorial.pptx
gridtest.py			scikitest.py
knn.py				txtread.py
matplotsample.py		winepca.py
paper				winered.csv
paper_cluster.py		winewhite.csv
pdf_txt_convert.py
MBP-de-Teche:mokumoku$ cd ..
MBP-de-Teche:projects$ ls
advent		memo-app	profy		robitalk_	techcamp
flaskproj	mokumoku	questionnaire	slack_py
fronttest	node-todo	robitalk	sql_curriculum
MBP-de-Teche:projects$ mkdir golang
MBP-de-Teche:projects$ cd golang/
MBP-de-Teche:golang$ ls
MBP-de-Teche:golang$ vim a.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go run a.go
1222
ARC
MBP-de-Teche:golang$
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go fmt siritori.go
siritori.go:21:23: missing ',' in argument list
siritori.go:22:22: missing ',' in argument list
siritori.go:23:22: missing ',' in argument list
exit status 2
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go fmt siritori.go
siritori.go
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ cat in
cat: in: No such file or directory
MBP-de-Teche:golang$ vim in
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go run siritori.go < in
# command-line-arguments
./siritori.go:7: imported and not used: "strconv"
./siritori.go:16: undefined: a
./siritori.go:18: undefined: b
./siritori.go:20: undefined: c
./siritori.go:21: cannot refer to unexported name fmt.printLn
./siritori.go:21: undefined: fmt.printLn
./siritori.go:21: undefined: a
./siritori.go:22: cannot refer to unexported name fmt.printLn
./siritori.go:22: undefined: fmt.printLn
./siritori.go:23: cannot refer to unexported name fmt.printLn
./siritori.go:22: too many errors
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go fmt siritori.go
MBP-de-Teche:golang$ go run siritori.go < in
# command-line-arguments
./siritori.go:7: imported and not used: "strconv"
./siritori.go:21: cannot refer to unexported name fmt.println
./siritori.go:21: undefined: fmt.println
./siritori.go:22: cannot refer to unexported name fmt.println
./siritori.go:22: undefined: fmt.println
./siritori.go:23: cannot refer to unexported name fmt.println
./siritori.go:23: undefined: fmt.println
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go run siritori.go < in
# command-line-arguments
./siritori.go:20: cannot refer to unexported name fmt.println
./siritori.go:20: undefined: fmt.println
./siritori.go:21: cannot refer to unexported name fmt.println
./siritori.go:21: undefined: fmt.println
./siritori.go:22: cannot refer to unexported name fmt.println
./siritori.go:22: undefined: fmt.println
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go run siritori.go < in
rng
gorilla
apple
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go fmt siritori.go
siritori.go:23:9: expected statement, found 'else'
siritori.go:28:3: expected '}', found 'EOF'
exit status 2
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go fmt siritori.go
siritori.go:23:9: expected statement, found 'else'
siritori.go:26:3: expected '}', found 'EOF'
exit status 2
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized
Press ENTER or type command to continue
MBP-de-Teche:golang$ go fmt siritori.go
siritori.go
MBP-de-Teche:golang$ go run siritori.go < in
# command-line-arguments
./siritori.go:20: invalid string index -1 (index must be non-negative)
MBP-de-Teche:golang$ vim siritori.go
Error detected while processing /Users/hiratsukamichihisa/.vimrc:
line    3:
E185: Cannot find color scheme solarized

import (
        "bufio"
        "fmt"
        "os"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {

        sc.Split(bufio.ScanWords)
        sc.Scan()
        a := sc.Text()
        sc.Scan()
        b := sc.Text()
        sc.Scan()
        c := sc.Text()
        if a[len(a)-1] == b[0] && b[len(b)-1] == c[0] {
                fmt.Println("YES")
        } else {
                fmt.Println("NO")
        }
}
