#include <bits/stdc++.h>
using namespace std;
namespace IO {
char buf_[1 << 21], *p1_ = buf_, *p2_ = buf_;
inline long long in() {
  long long s = 0, f = 1;
  char x = (p1_ == p2_ && (p2_ = (p1_ = buf_) + fread(buf_, 1, 1 << 21, stdin),
                           p1_ == p2_)
                ? EOF
                : *p1_++);
  for (; x < '0' || x > '9';
       x = (p1_ == p2_ && (p2_ = (p1_ = buf_) + fread(buf_, 1, 1 << 21, stdin),
                          p1_ == p2_)
                ? EOF
                : *p1_++))
    if (x == '-') f = -1;
  for (; x >= '0' && x <= '9';
       x = (p1_ == p2_ && (p2_ = (p1_ = buf_) + fread(buf_, 1, 1 << 21, stdin),
                          p1_ == p2_)
                ? EOF
                : *p1_++))
    s = (s * 10) + (x & 15);
  return f == 1 ? s : -s;
}
char _buf[1 << 21];
long long _pos = -1;
inline void flush() { fwrite(_buf, 1, _pos + 1, stdout), _pos = -1; }
inline void pc(char x) {
  if (_pos == (1 << 21) - 1) flush();
  _buf[++_pos] = x;
}
inline void out(long long x) {
  char k[30];
  long long pos = 0;
  if (!x) return pc('0');
  if (x < 0) pc('-'), x = -x;
  while (x) k[++pos] = (x % 10) | 48, x /= 10;
  for (long long i = pos; i; i--) pc(k[i]);
}
inline void out(string x) {
  long long len = x.size();
  for (long long i = 0; i < len; i++) pc(x[i]);
}
}  // namespace IO
using namespace IO;
long long n, m;
inline void print(long long x, long long y) {
  out(x), pc(' '), out(y), pc('\n');
}
signed main() {
  n = in(), m = in();
  for (long long i = 1; i <= n / 2; i++)
    for (long long j = 1; j <= m; j++) print(i, j), print(n - i + 1, m - j + 1);
  if (n & 1) {
    for (long long i = 1; i <= m / 2; i++)
      print((n + 1) / 2, i), print((n + 1) / 2, m - i + 1);
    if (m & 1) print((n + 1) / 2, (m + 1) / 2);
  }
  flush();
  return 0;
}
